@@ -87,11 +87,11 @@ func (k Keeper) IterateValidators(context.Context, func(index int64, validator s
87
87
// Validator - unimplemented on CCV keeper but implemented on standalone keeper
88
88
func (k Keeper ) Validator (sdkCtx context.Context , addr sdk.ValAddress ) (stakingtypes.ValidatorI , error ) {
89
89
ctx := sdk .UnwrapSDKContext (sdkCtx )
90
- if k .IsPrevStandaloneChain ( ctx ) && k . ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
90
+ if k .ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
91
91
return k .standaloneStakingKeeper .Validator (ctx , addr )
92
92
}
93
93
94
- panic ("unimplemented on CCV keeper" )
94
+ return stakingtypes. Validator {}, errors . New ("unimplemented on CCV keeper" )
95
95
}
96
96
97
97
// IsJailed returns the outstanding slashing flag for the given validator address
@@ -184,7 +184,7 @@ func (k Keeper) Jail(context.Context, sdk.ConsAddress) error { return nil }
184
184
// This method should be a no-op for consumer chains that launched with the CCV module first.
185
185
func (k Keeper ) Unjail (sdkCtx context.Context , addr sdk.ConsAddress ) error {
186
186
ctx := sdk .UnwrapSDKContext (sdkCtx )
187
- if k .IsPrevStandaloneChain ( ctx ) && k . ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
187
+ if k .ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
188
188
return k .standaloneStakingKeeper .Unjail (ctx , addr )
189
189
}
190
190
return nil
@@ -193,10 +193,10 @@ func (k Keeper) Unjail(sdkCtx context.Context, addr sdk.ConsAddress) error {
193
193
// Delegation - unimplemented on CCV keeper but implemented on standalone keeper
194
194
func (k Keeper ) Delegation (sdkCtx context.Context , addr sdk.AccAddress , valAddr sdk.ValAddress ) (stakingtypes.DelegationI , error ) {
195
195
ctx := sdk .UnwrapSDKContext (sdkCtx )
196
- if k .IsPrevStandaloneChain ( ctx ) && k . ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
196
+ if k .ChangeoverIsComplete (ctx ) && k .standaloneStakingKeeper != nil {
197
197
return k .standaloneStakingKeeper .Delegation (ctx , addr , valAddr )
198
198
}
199
- panic ("unimplemented on CCV keeper" )
199
+ return stakingtypes. Delegation {}, errors . New ("unimplemented on CCV keeper" )
200
200
}
201
201
202
202
// MaxValidators - unimplemented on CCV keeper
0 commit comments