Skip to content

Commit

Permalink
fix(simapp): set chain-id on NewSimApp for sim bench tests (backport
Browse files Browse the repository at this point in the history
…#17138) (#17140)

Co-authored-by: Giuseppe Natale <12249307+giunatale@users.noreply.github.com>
  • Loading branch information
mergify[bot] and giunatale committed Jul 26, 2023
1 parent dea7694 commit efc0b6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions simapp/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
Expand Down Expand Up @@ -60,7 +61,7 @@ func BenchmarkFullAppSimulation(b *testing.B) {
appOptions.SetDefault(flags.FlagHome, DefaultNodeHome)
appOptions.SetDefault(server.FlagInvCheckPeriod, simcli.FlagPeriodValue)

app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt())
app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID))

// run randomized simulation
_, simParams, simErr := simulation.SimulateFromSeed(
Expand Down Expand Up @@ -115,7 +116,7 @@ func BenchmarkInvariants(b *testing.B) {
appOptions[flags.FlagHome] = DefaultNodeHome
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue

app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt())
app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID))

// run randomized simulation
_, simParams, simErr := simulation.SimulateFromSeed(
Expand Down

0 comments on commit efc0b6c

Please sign in to comment.