From 91ae7584e4f7b5bdb867d2da2e349428e3859313 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Tue, 17 Dec 2024 09:50:06 +0900 Subject: [PATCH] fix(tests): fix simulation test invalid genesis state --- x/rewards/simulation/genesis.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x/rewards/simulation/genesis.go b/x/rewards/simulation/genesis.go index c7b1678b5..95399194a 100644 --- a/x/rewards/simulation/genesis.go +++ b/x/rewards/simulation/genesis.go @@ -40,7 +40,11 @@ func RandomizedGenState(simState *module.SimulationState) { types.NewDelegationTypeRecords(nil, nil, nil, nil), types.NewDelegationTypeRecords(nil, nil, nil, nil), types.NewDelegationTypeRecords(nil, nil, nil, nil), - RandomOperatorAccumulatedCommissionRecords(simState.Rand, operatorsGenesis.Operators, []string{simState.BondDenom}), + + // Empty accumulated commissions since we need to perform side effects on + // other modules to have valid commissions + nil, + RandomPoolServiceTotalDelegatorShares(simState.Rand, poolsGenesis, servicesGenesis, []string{simState.BondDenom}), ) simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(genesis)