mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-01 09:42:12 +00:00
parent
9e075d8dd5
commit
bc2a9b20c0
@ -23,4 +23,5 @@ Special thanks to external contributors on this release:
|
|||||||
|
|
||||||
### BUG FIXES:
|
### BUG FIXES:
|
||||||
- [kv indexer] \#2912 don't ignore key when executing CONTAINS
|
- [kv indexer] \#2912 don't ignore key when executing CONTAINS
|
||||||
|
- [mempool] \#2994 Don't allow txs with negative gas wanted
|
||||||
- [p2p] \#2715 fix a bug where seeds don't disconnect from a peer after 3h
|
- [p2p] \#2715 fix a bug where seeds don't disconnect from a peer after 3h
|
||||||
|
@ -490,11 +490,15 @@ func (mem *Mempool) ReapMaxBytesMaxGas(maxBytes, maxGas int64) types.Txs {
|
|||||||
return txs
|
return txs
|
||||||
}
|
}
|
||||||
totalBytes += int64(len(memTx.tx)) + aminoOverhead
|
totalBytes += int64(len(memTx.tx)) + aminoOverhead
|
||||||
// Check total gas requirement
|
// Check total gas requirement.
|
||||||
if maxGas > -1 && totalGas+memTx.gasWanted > maxGas {
|
// If maxGas is negative, skip this check.
|
||||||
|
// Since newTotalGas < masGas, which
|
||||||
|
// must be non-negative, it follows that this won't overflow.
|
||||||
|
newTotalGas := totalGas + memTx.gasWanted
|
||||||
|
if maxGas > -1 && newTotalGas > maxGas {
|
||||||
return txs
|
return txs
|
||||||
}
|
}
|
||||||
totalGas += memTx.gasWanted
|
totalGas = newTotalGas
|
||||||
txs = append(txs, memTx.tx)
|
txs = append(txs, memTx.tx)
|
||||||
}
|
}
|
||||||
return txs
|
return txs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user