Skip to content

Commit

Permalink
fix: Update RequestInitChain in Simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Sep 9, 2021
1 parent bb88664 commit 2f5bac8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions x/simulation/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,22 @@ const AverageBlockTime = 6 * time.Second

// initialize the chain for the simulation
func initChain(
r *rand.Rand, params Params, accounts []simulation.Account, app *baseapp.BaseApp,
appStateFn simulation.AppStateFn, config simulation.Config, cdc codec.JSONCodec,
r *rand.Rand,
params Params,
accounts []simulation.Account,
app *baseapp.BaseApp,
appStateFn simulation.AppStateFn,
config simulation.Config,
cdc codec.JSONCodec,
) (mockValidators, time.Time, []simulation.Account, string) {
appState, accounts, chainID, genesisTimestamp := appStateFn(r, accounts, config)

appState, accounts, chainID, genesisTimestamp := appStateFn(r, accounts, config)
consensusParams := randomConsensusParams(r, appState, cdc)

req := abci.RequestInitChain{
AppStateBytes: appState,
ChainId: chainID,
ConsensusParams: consensusParams,
Time: genesisTimestamp,
}
res := app.InitChain(req)
validators := newMockValidators(r, res.Validators, params)
Expand Down

0 comments on commit 2f5bac8

Please sign in to comment.