Skip to content

Commit 0bf7700

Browse files
committed
flashbots: fix bug in double counting gas for profit switcher
Only add in the eth sent to coinbase, since the gas fees are counted already in commitTransaction
1 parent 5d9648d commit 0bf7700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
11971197
if w.commitBundle(bundleTxs, w.coinbase, interrupt) {
11981198
return
11991199
}
1200-
w.current.profit.Add(w.current.profit, bundle.totalEth)
1200+
w.current.profit.Add(w.current.profit, bundle.ethSentToCoinbase)
12011201
}
12021202
if w.flashbots.isMegabundleWorker {
12031203
megabundle, err := w.eth.TxPool().GetMegabundle(w.flashbots.relayAddr, header.Number, header.Time)

0 commit comments

Comments
 (0)