Skip to content

Commit

Permalink
move rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsu522 committed Dec 22, 2024
1 parent 3959557 commit 01fa4e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,17 @@ func (txmp *TxMempool) ReapMaxBytesMaxGas(maxBytes, maxGas int64) types.Txs {
if maxBytes > -1 && totalSize+size > maxBytes {
return false
}

if wtx.gasWanted >= txmp.config.MaxTxGas {
txmp.metrics.TxGasWantedTooHigh.Add(1)
return false
}
totalSize += size
gas := totalGas + wtx.gasWanted
if maxGas > -1 && gas > maxGas {
return false
}

if wtx.gasWanted >= txmp.config.MaxTxGas {
txmp.metrics.TxGasWantedTooHigh.Add(1)
return false
}

totalGas = gas

txs = append(txs, wtx.tx)
Expand Down

0 comments on commit 01fa4e3

Please sign in to comment.