Skip to content

Commit

Permalink
baseapp: allow for infinite gas when maxGas < 0
Browse files Browse the repository at this point in the history
Closes: #3791
  • Loading branch information
Alessio Treglia committed Mar 4, 2019
1 parent 5d05b7f commit c6d62df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ truncation of undelegation tokens.
* [\#3717] Ignore unknown proposers in allocating rewards for proposers, in case
unbonding period was just 1 block and proposer was already deleted.
* [\#3726] Cap(clip) reward to remaining coins in AllocateTokens.
* [\#3791] baseapp: allow for infinite gas when maxGas < 0

### Tendermint
3 changes: 2 additions & 1 deletion baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (app *BaseApp) storeConsensusParams(consensusParams *abci.ConsensusParams)

// getMaximumBlockGas gets the maximum gas from the consensus params.
func (app *BaseApp) getMaximumBlockGas() (maxGas uint64) {
if app.consensusParams == nil || app.consensusParams.BlockSize == nil {
if app.consensusParams == nil || app.consensusParams.BlockSize == nil ||
app.consensusParams.BlockSize.MaxGas <= 0 {
return 0
}
return uint64(app.consensusParams.BlockSize.MaxGas)
Expand Down

0 comments on commit c6d62df

Please sign in to comment.