diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ed8751c1..2deb8bd891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * chore(deps) [\#1141](https://github.com/Finschia/finschia-sdk/pull/1141) Bump github.com/cosmos/ledger-cosmos-go from 0.12.2 to 0.13.2 to fix ledger signing issue * (x/auth, x/slashing) [\#1179](https://github.com/Finschia/finschia-sdk/pull/1179) modify missing changes of converting to tendermint +* (x/stakingplus) [\#1265](https://github.com/Finschia/finschia-sdk/pull/1265) implement `module.AppModuleSimulation` for `TestAppStateDeterminism` ### Removed diff --git a/x/stakingplus/module/module.go b/x/stakingplus/module/module.go index 8395e73741..606acbc457 100644 --- a/x/stakingplus/module/module.go +++ b/x/stakingplus/module/module.go @@ -17,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/staking" @@ -29,11 +30,12 @@ import ( ) var ( - _ module.AppModuleBasic = AppModuleBasic{} - _ module.HasServices = AppModule{} - _ module.HasInvariants = AppModule{} - _ module.HasABCIGenesis = AppModule{} - _ module.HasABCIEndBlock = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + _ module.HasABCIGenesis = AppModule{} + _ module.HasABCIEndBlock = AppModule{} + _ module.AppModuleSimulation = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasBeginBlocker = AppModule{} @@ -63,6 +65,18 @@ type AppModule struct { ls exported.Subspace } +func (am AppModule) GenerateGenesisState(simState *module.SimulationState) { + am.impl.GenerateGenesisState(simState) +} + +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { + am.impl.RegisterStoreDecoder(sdr) +} + +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + return am.impl.WeightedOperations(simState) +} + // NewAppModule creates a new AppModule object func NewAppModule(cdc codec.Codec, keeper *stakingkeeper.Keeper, ak stakingtypes.AccountKeeper, bk stakingtypes.BankKeeper, fk stakingplus.FoundationKeeper, ls exported.Subspace) AppModule { impl := staking.NewAppModule(cdc, keeper, ak, bk, ls)