@@ -579,11 +579,12 @@ func (w *worker) newWorkLoop(recommit time.Duration) {
579579 // If sealing is running resubmit a new work cycle periodically to pull in
580580 // higher priced transactions. Disable this overhead for pending blocks.
581581 if w .isRunning () && (w .chainConfig .Clique == nil || w .chainConfig .Clique .Period > 0 ) {
582+ // flashbots: disable this because there can be new bundles
582583 // Short circuit if no new transaction arrives.
583- if atomic .LoadInt32 (& w .newTxs ) == 0 {
584- timer .Reset (recommit )
585- continue
586- }
584+ // if atomic.LoadInt32(&w.newTxs) == 0 {
585+ // timer.Reset(recommit)
586+ // continue
587+ // }
587588 commit (true , commitInterruptResubmit )
588589 }
589590
@@ -1297,6 +1298,23 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
12971298 return env , nil
12981299}
12991300
1301+ func (w * worker ) fillTransactionsSelectAlgo (interrupt * int32 , env * environment ) (error , []types.SimulatedBundle , []types.SimulatedBundle ) {
1302+ var (
1303+ blockBundles []types.SimulatedBundle
1304+ allBundles []types.SimulatedBundle
1305+ err error
1306+ )
1307+ switch w .flashbots .algoType {
1308+ case ALGO_GREEDY :
1309+ err , blockBundles , allBundles = w .fillTransactionsAlgoWorker (interrupt , env )
1310+ case ALGO_MEV_GETH :
1311+ err , blockBundles , allBundles = w .fillTransactions (interrupt , env )
1312+ default :
1313+ err , blockBundles , allBundles = w .fillTransactions (interrupt , env )
1314+ }
1315+ return err , blockBundles , allBundles
1316+ }
1317+
13001318// fillTransactions retrieves the pending transactions from the txpool and fills them
13011319// into the given sealing block. The transaction selection and ordering strategy can
13021320// be customized with the plugin in the future.
0 commit comments