Skip to content

Commit

Permalink
chore: add chain id for app determinism
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Jul 1, 2024
1 parent 6fbc3c5 commit 41e2a6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/simulation/app_determinism_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

dbm "github.com/cometbft/cometbft-db"
"github.com/cometbft/cometbft/libs/log"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/stretchr/testify/require"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
Expand Down Expand Up @@ -46,6 +47,7 @@ func TestAppDeterminism(t *testing.T) {
}

db := dbm.NewMemDB()

app := regen.NewRegenApp(
logger,
db,
Expand All @@ -54,14 +56,14 @@ func TestAppDeterminism(t *testing.T) {
simcli.FlagPeriodValue,
simtestutil.EmptyAppOptions{},
interBlockCacheOpt(),
baseapp.SetChainID(SimAppChainID),
)
require.Equal(t, regen.AppName, app.Name())

fmt.Printf(
"running app-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n",
config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed,
)

_, _, err := simulateFromSeed(t, app, config)

require.NoError(t, err)
Expand Down

0 comments on commit 41e2a6a

Please sign in to comment.