diff --git a/baseapp/test_helpers.go b/baseapp/test_helpers.go index cffc2589f089..1cb71825bc92 100644 --- a/baseapp/test_helpers.go +++ b/baseapp/test_helpers.go @@ -2,6 +2,7 @@ package baseapp import ( cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + cmttypes "github.com/cometbft/cometbft/types" coreheader "cosmossdk.io/core/header" errorsmod "cosmossdk.io/errors" @@ -64,11 +65,15 @@ func (app *BaseApp) NewContext(isCheckTx bool) sdk.Context { } func (app *BaseApp) NewUncachedContext(isCheckTx bool, header cmtproto.Header) sdk.Context { + cmtHeader, _ := cmttypes.HeaderFromProto(&header) return sdk.NewContext(app.cms, isCheckTx, app.logger). WithBlockHeader(header). WithHeaderInfo(coreheader.Info{ - Height: header.Height, - Time: header.Time, + AppHash: cmtHeader.AppHash, + Hash: cmtHeader.Hash(), + ChainID: cmtHeader.ChainID, + Height: cmtHeader.Height, + Time: cmtHeader.Time, }) }