diff --git a/testutil/mocks.go b/testutil/mocks.go index d94116b..d2c9e2b 100644 --- a/testutil/mocks.go +++ b/testutil/mocks.go @@ -233,6 +233,31 @@ func (mr *MockStakingKeeperRecorder) GetValidator(ctx, addr interface{}) *gomock return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidator", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidator), ctx, addr) } +func (m *MockStakingKeeper) IterateValidators(ctx context.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IterateValidators", ctx, fn) + ret0, _ := ret[0].(error) + return ret0 +} + +func (mr *MockStakingKeeperRecorder) IterateValidators(ctx, fn interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateValidators", reflect.TypeOf((*MockStakingKeeper)(nil).IterateValidators), ctx, fn) +} + +func (m *MockStakingKeeper) TotalBondedTokens(ctx context.Context) (math.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TotalBondedTokens", ctx) + ret0, _ := ret[0].(math.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (mr *MockStakingKeeperRecorder) TotalBondedTokens(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), ctx) +} + func (m *MockStakingKeeper) Delegate(ctx context.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (math.LegacyDec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delegate", ctx, delAddr, bondAmt, tokenSrc, validator, subtractAccount) diff --git a/x/tier/types/expected_keepers.go b/x/tier/types/expected_keepers.go index 6efe186..15b0114 100644 --- a/x/tier/types/expected_keepers.go +++ b/x/tier/types/expected_keepers.go @@ -26,6 +26,8 @@ type StakingKeeper interface { sharesAmount math.LegacyDec) (completionTime time.Time, err error) BondDenom(ctx context.Context) (string, error) GetValidator(ctx context.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, err error) + IterateValidators(context.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error + TotalBondedTokens(context.Context) (math.Int, error) ValidateUnbondAmount(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int) ( shares math.LegacyDec, err error) GetUnbondingDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (