@@ -184,7 +184,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update engine.ForkchoiceStateV1, pa
184184 return engine .STATUS_INVALID , engine .InvalidParams .With (errors .New ("forkChoiceUpdateV1 called post-shanghai" ))
185185 }
186186 }
187- return api .forkchoiceUpdated (update , payloadAttributes , engine .PayloadV1 , false )
187+ return api .forkchoiceUpdated (update , payloadAttributes , engine .PayloadV1 )
188188}
189189
190190// ForkchoiceUpdatedV2 is equivalent to V1 with the addition of withdrawals in the payload
@@ -207,7 +207,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV2(update engine.ForkchoiceStateV1, pa
207207 return engine .STATUS_INVALID , engine .UnsupportedFork .With (errors .New ("forkchoiceUpdatedV2 must only be called with paris and shanghai payloads" ))
208208 }
209209 }
210- return api .forkchoiceUpdated (update , params , engine .PayloadV2 , false )
210+ return api .forkchoiceUpdated (update , params , engine .PayloadV2 )
211211}
212212
213213// ForkchoiceUpdatedV3 is equivalent to V2 with the addition of parent beacon block root
@@ -228,10 +228,10 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV3(update engine.ForkchoiceStateV1, pa
228228 // hash, even if params are wrong. To do this we need to split up
229229 // forkchoiceUpdate into a function that only updates the head and then a
230230 // function that kicks off block construction.
231- return api .forkchoiceUpdated (update , params , engine .PayloadV3 , false )
231+ return api .forkchoiceUpdated (update , params , engine .PayloadV3 )
232232}
233233
234- func (api * ConsensusAPI ) forkchoiceUpdated (update engine.ForkchoiceStateV1 , payloadAttributes * engine.PayloadAttributes , payloadVersion engine.PayloadVersion , simulatorMode bool ) (engine.ForkChoiceResponse , error ) {
234+ func (api * ConsensusAPI ) forkchoiceUpdated (update engine.ForkchoiceStateV1 , payloadAttributes * engine.PayloadAttributes , payloadVersion engine.PayloadVersion ) (engine.ForkChoiceResponse , error ) {
235235 api .forkchoiceLock .Lock ()
236236 defer api .forkchoiceLock .Unlock ()
237237
@@ -374,19 +374,6 @@ func (api *ConsensusAPI) forkchoiceUpdated(update engine.ForkchoiceStateV1, payl
374374 if api .localBlocks .has (id ) {
375375 return valid (& id ), nil
376376 }
377- // If the beacon chain is ran by a simulator, then transaction insertion,
378- // block insertion and block production will happen without any timing
379- // delay between them. This will cause flaky simulator executions due to
380- // the transaction pool running its internal reset operation on a back-
381- // ground thread. To avoid the racey behavior - in simulator mode - the
382- // pool will be explicitly blocked on its reset before continuing to the
383- // block production below.
384- if simulatorMode {
385- if err := api .eth .TxPool ().Sync (); err != nil {
386- log .Error ("Failed to sync transaction pool" , "err" , err )
387- return valid (nil ), engine .InvalidPayloadAttributes .With (err )
388- }
389- }
390377 payload , err := api .eth .Miner ().BuildPayload (args )
391378 if err != nil {
392379 log .Error ("Failed to build payload" , "err" , err )
0 commit comments