Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
catShaark committed Apr 28, 2022
1 parent 9f71a99 commit 3e3d599
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,20 +520,23 @@ func (app *BaseApp) getState(mode runTxMode) *state {

// retrieve the context for the tx w/ txBytes and other memoized values.
func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) sdk.Context {
ctx := app.getState(mode).ctx.
WithTxBytes(txBytes).
WithVoteInfos(app.voteInfos)

ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx))
var ctx sdk.Context

if mode == runTxModeReCheck {
ctx = app.getState(mode).ctx
ctx = ctx.WithIsReCheckTx(true)
}

if mode == runTxModeSimulate {
ctx, _ = ctx.CacheContext()
ctx, _ = app.createQueryContext(app.LastBlockHeight(), false)
}

ctx = ctx.WithTxBytes(txBytes).
WithVoteInfos(app.voteInfos)

ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx))

return ctx
}

Expand Down

0 comments on commit 3e3d599

Please sign in to comment.