Skip to content

Commit

Permalink
feat!: enable unjail related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Nov 19, 2024
1 parent f7ceecc commit 38585ab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions x/ccv/consumer/keeper/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ func (k Keeper) IterateValidators(context.Context, func(index int64, validator s
}

// Validator - unimplemented on CCV keeper
func (k Keeper) Validator(ctx context.Context, addr sdk.ValAddress) (stakingtypes.ValidatorI, error) {
func (k Keeper) Validator(sdkCtx context.Context, addr sdk.ValAddress) (stakingtypes.ValidatorI, error) {
ctx := sdk.UnwrapSDKContext(sdkCtx)
if k.IsPrevStandaloneChain(ctx) && k.ChangeoverIsComplete(ctx) && k.standaloneStakingKeeper != nil {
return k.standaloneStakingKeeper.Validator(ctx, addr)
}

panic("unimplemented on CCV keeper")
}

Expand Down Expand Up @@ -186,7 +191,11 @@ func (k Keeper) Unjail(sdkCtx context.Context, addr sdk.ConsAddress) error {
}

// Delegation - unimplemented on CCV keeper
func (k Keeper) Delegation(ctx context.Context, addr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.DelegationI, error) {
func (k Keeper) Delegation(sdkCtx context.Context, addr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.DelegationI, error) {
ctx := sdk.UnwrapSDKContext(sdkCtx)
if k.IsPrevStandaloneChain(ctx) && k.ChangeoverIsComplete(ctx) && k.standaloneStakingKeeper != nil {
return k.standaloneStakingKeeper.Delegation(ctx, addr, valAddr)
}
panic("unimplemented on CCV keeper")
}

Expand Down

0 comments on commit 38585ab

Please sign in to comment.