Skip to content

Commit

Permalink
feat!: enable unjail on pre-ccv chains
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Nov 11, 2024
1 parent 8219ff3 commit a42f344
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion x/ccv/consumer/keeper/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ func (k Keeper) Jail(context.Context, sdk.ConsAddress) error { return nil }
// This method should be a no-op even during a standalone to consumer changeover.
// Once the upgrade has happened as a part of the changeover,
// the provider validator set will soon be in effect, and jailing is n/a.
func (k Keeper) Unjail(context.Context, sdk.ConsAddress) error { return nil }
func (k Keeper) Unjail(sdkCtx context.Context, addr sdk.ConsAddress) error {
ctx := sdk.UnwrapSDKContext(sdkCtx)
if k.IsPrevStandaloneChain(ctx) && k.ChangeoverIsComplete(ctx) && k.standaloneStakingKeeper != nil {
return k.standaloneStakingKeeper.Unjail(ctx, addr)
}
return nil
}

// Delegation - unimplemented on CCV keeper
func (k Keeper) Delegation(ctx context.Context, addr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.DelegationI, error) {
Expand Down

0 comments on commit a42f344

Please sign in to comment.