diff --git a/simapp/v2/app_test.go b/simapp/v2/app_test.go index c3c51489a7e5..3ea361e3becb 100644 --- a/simapp/v2/app_test.go +++ b/simapp/v2/app_test.go @@ -94,6 +94,7 @@ func NewTestApp(t *testing.T) (*SimApp[transaction.Tx], context.Context) { ChainId: "theChain", AppHash: ci.Hash, IsGenesis: true, + Height: 1, }, genesisBytes, nil, @@ -103,7 +104,7 @@ func NewTestApp(t *testing.T) (*SimApp[transaction.Tx], context.Context) { changes, err := newState.GetStateChanges() require.NoError(t, err) - _, err = st.Commit(&store.Changeset{Changes: changes}) + _, err = st.Commit(&store.Changeset{Version: 1, Changes: changes}) require.NoError(t, err) return app, ctx @@ -119,6 +120,7 @@ func MoveNextBlock(t *testing.T, app *SimApp[transaction.Tx], ctx context.Contex require.NoError(t, err) height, err := app.LoadLatestHeight() + height++ require.NoError(t, err) // TODO: this is a hack to set the comet info in the context for distribution module dependency. @@ -132,7 +134,7 @@ func MoveNextBlock(t *testing.T, app *SimApp[transaction.Tx], ctx context.Contex _, newState, err := app.DeliverBlock( ctx, &server.BlockRequest[transaction.Tx]{ - Height: height + 1, + Height: height, Time: time.Now(), Hash: bz[:], AppHash: ci.Hash, @@ -142,7 +144,7 @@ func MoveNextBlock(t *testing.T, app *SimApp[transaction.Tx], ctx context.Contex changes, err := newState.GetStateChanges() require.NoError(t, err) - _, err = st.Commit(&store.Changeset{Changes: changes}) + _, err = st.Commit(&store.Changeset{Version: height, Changes: changes}) require.NoError(t, err) }