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 Sep 27, 2021
1 parent 32506e6 commit ec1b481
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 ec1b481

Please sign in to comment.