Skip to content

Commit

Permalink
feat: drop out when out of gas in merge bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Oct 14, 2024
1 parent f5ef287 commit 497d232
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions miner/worker_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ func (w *worker) mergeBundles(
}

for _, bundle := range bundles {
// if we don't have enough gas for any further transactions then we're done
if gasPool.Gas() < params.TxGas {
break
}

prevState := currentState.Copy()
prevGasPool := new(core.GasPool).AddGas(gasPool.Gas())

Expand Down

0 comments on commit 497d232

Please sign in to comment.