From 1a1a1a9dafa2d92ad00daa097f550e981bec067c Mon Sep 17 00:00:00 2001
From: Philip Offtermatt
Date: Thu, 18 Jul 2024 11:27:01 +0200
Subject: [PATCH] Add TotalBondedTokens to expected staking keeper interface
---
testutil/keeper/mocks.go | 15 +++++++++++++++
x/ccv/types/expected_keepers.go | 1 +
2 files changed, 16 insertions(+)
diff --git a/testutil/keeper/mocks.go b/testutil/keeper/mocks.go
index 600f0596d9..8be9418b97 100644
--- a/testutil/keeper/mocks.go
+++ b/testutil/keeper/mocks.go
@@ -506,6 +506,21 @@ func (mr *MockStakingKeeperMockRecorder) StakingTokenSupply(ctx interface{}) *go
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StakingTokenSupply", reflect.TypeOf((*MockStakingKeeper)(nil).StakingTokenSupply), ctx)
}
+// TotalBondedTokens mocks base method.
+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
+}
+
+// TotalBondedTokens indicates an expected call of TotalBondedTokens.
+func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(ctx interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), ctx)
+}
+
// UnbondingCanComplete mocks base method.
func (m *MockStakingKeeper) UnbondingCanComplete(ctx context.Context, id uint64) error {
m.ctrl.T.Helper()
diff --git a/x/ccv/types/expected_keepers.go b/x/ccv/types/expected_keepers.go
index 280863daa6..9d4ece168f 100644
--- a/x/ccv/types/expected_keepers.go
+++ b/x/ccv/types/expected_keepers.go
@@ -68,6 +68,7 @@ type StakingKeeper interface {
) error
StakingTokenSupply(ctx context.Context) (math.Int, error)
BondedRatio(ctx context.Context) (math.LegacyDec, error)
+ TotalBondedTokens(ctx context.Context) (math.Int, error)
}
// SlashingKeeper defines the contract expected to perform ccv slashing