Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Aug 1, 2024
1 parent 246e258 commit d568439
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,11 @@ func TestABCI_CreateQueryContext(t *testing.T) {
})
require.NoError(t, err)
}
ctx, err := app.CreateQueryContext(tc.height, tc.prove)
height := tc.height
if tc.height > tc.headerHeight {
height = 0
}
ctx, err := app.CreateQueryContext(height, tc.prove)
if tc.expErr {
require.Error(t, err)
} else {
Expand Down Expand Up @@ -797,7 +801,7 @@ func TestABCI_CreateQueryContext_Before_Set_CheckState(t *testing.T) {
ABCIListeners: []storetypes.ABCIListener{
&mockABCIListener{
ListenCommitFn: func(context.Context, abci.CommitResponse, []*storetypes.StoreKVPair) error {
qCtx, qErr := app.CreateQueryContext(height, true)
qCtx, qErr := app.CreateQueryContext(0, true)
queryCtx = &qCtx
queryCtxErr = qErr
return nil
Expand Down

0 comments on commit d568439

Please sign in to comment.