fix(sims): TestAppSimulationAfterImport and legacy proposal handling (backport #21800) (#21805)

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-09-18 17:28:21 +02:00
committed by GitHub
co-authored by Alexander Peters
parent 93959d6976
commit e42e270078
11 changed files with 201 additions and 60 deletions
+2 -2
View File
@@ -115,9 +115,9 @@ func MsgSubmitLegacyProposalFactory(k *keeper.Keeper, contentSimFn simtypes.Cont
})
}
func MsgSubmitProposalFactory(k *keeper.Keeper, payloadFactory simsx.SimMsgFactoryX) simsx.SimMsgFactoryX {
func MsgSubmitProposalFactory(k *keeper.Keeper, payloadFactory simsx.FactoryMethod) simsx.SimMsgFactoryX {
return simsx.NewSimMsgFactoryWithFutureOps[*v1.MsgSubmitProposal](func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter, fOpsReg simsx.FutureOpsRegistry) ([]simsx.SimAccount, *v1.MsgSubmitProposal) {
_, proposalMsg := payloadFactory.Create()(ctx, testData, reporter)
_, proposalMsg := payloadFactory(ctx, testData, reporter)
return submitProposalWithVotesScheduled(ctx, k, testData, reporter, fOpsReg, proposalMsg)
})
}