Skip to content

Commit

Permalink
Fix simulation since NewContext doesn't pass through the chainId whil…
Browse files Browse the repository at this point in the history
…e NewContextLegacy does.
  • Loading branch information
lcwik committed Dec 18, 2023
1 parent 453251a commit b37130f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocol/testutil/sim_helpers/operation_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func GenerateAndCheckTx(

// Workaround: cosmos-sdk Simulation hard-codes to a deliver context. Generate and use a new
// check context (with the same headers) specifically for CheckTx.
checkTxCtx := app.NewContext(true).WithBlockHeader(ctx.BlockHeader())
checkTxCtx := app.NewContextLegacy(true, ctx.BlockHeader())

simAccount := ak.GetAccount(checkTxCtx, account.Address)
spendable := bk.SpendableCoins(checkTxCtx, simAccount.GetAddress())
Expand Down

0 comments on commit b37130f

Please sign in to comment.