MCPcopy Create free account
hub / github.com/base/base / probe_el_sync

Method probe_el_sync

crates/consensus/engine/src/task_queue/core.rs:502–511  ·  view source on GitHub ↗

Probes the EL with a bare FCU to determine whether a snap-sync is in progress. Unlike [`Engine::reset`], this does not search for a sync starting point — it FCUs to the state the caller already knows reth holds. Used during bootstrap when reth is beyond genesis to distinguish two cases: - `Ok(true)` — reth responded `Valid`: the canonical chain is complete. `el_sync_finished` is set to `true` an

(
        &mut self,
        client: Arc<EngineClient_>,
        config: Arc<RollupConfig>,
        update: EngineSyncStateUpdate,
    )

Source from the content-addressed store, hash-verified

500 /// [`SynchronizeTask`] will detect an identical state and skip the FCU silently,
501 /// leaving `el_sync_finished = false`. Always probe before seeding.
502 pub async fn probe_el_sync(
503 &mut self,
504 client: Arc<EngineClient_>,
505 config: Arc<RollupConfig>,
506 update: EngineSyncStateUpdate,
507 ) -> Result<bool, SynchronizeTaskError> {
508 SynchronizeTask::new(client, config, update).execute(&mut self.state).await?;
509 self.state_sender.send_replace(self.state);
510 Ok(self.state.el_sync_finished)
511 }
512
513 /// Clears the task queue.
514 pub fn clear(&mut self) {

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected