Skip to content

Commit

Permalink
flashbots: fix bug in double counting gas for profit switcher
Browse files Browse the repository at this point in the history
Only add in the eth sent to coinbase, since the gas fees are counted
already in commitTransaction
  • Loading branch information
jparyani committed Oct 4, 2021
1 parent 5d9648d commit 0bf7700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
if w.commitBundle(bundleTxs, w.coinbase, interrupt) {
return
}
w.current.profit.Add(w.current.profit, bundle.totalEth)
w.current.profit.Add(w.current.profit, bundle.ethSentToCoinbase)
}
if w.flashbots.isMegabundleWorker {
megabundle, err := w.eth.TxPool().GetMegabundle(w.flashbots.relayAddr, header.Number, header.Time)
Expand Down

0 comments on commit 0bf7700

Please sign in to comment.