Skip to content

Commit 9941498

Browse files
authored
fix(baseapp): don't share global gas meter in tx execution (backport #19616) (#20050)
1 parent dafcc78 commit 9941498

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
5656
* (server) [#19884](https://github.com/cosmos/cosmos-sdk/pull/19884) Add start customizability to start command options.
5757
* (x/gov) [#19853](https://github.com/cosmos/cosmos-sdk/pull/19853) Emit `depositor` in `EventTypeProposalDeposit`.
5858
* (x/gov) [#19844](https://github.com/cosmos/cosmos-sdk/pull/19844) Emit the proposer of governance proposals.
59+
* (baseapp) [#19616](https://github.com/cosmos/cosmos-sdk/pull/19616) Don't share gas meter in tx execution.
5960

6061
## Bug Fixes
6162

baseapp/baseapp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ func (app *BaseApp) getContextForTx(mode execMode, txBytes []byte) sdk.Context {
665665
panic(fmt.Sprintf("state is nil for mode %v", mode))
666666
}
667667
ctx := modeState.Context().
668-
WithTxBytes(txBytes)
668+
WithTxBytes(txBytes).
669+
WithGasMeter(storetypes.NewInfiniteGasMeter())
669670
// WithVoteInfos(app.voteInfos) // TODO: identify if this is needed
670671

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

0 commit comments

Comments
 (0)