mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 16:18:08 -05:00
feat: support initial target pipeline sync (#9683)
This commit is contained in:
@@ -92,6 +92,11 @@ where
|
||||
|
||||
Self { orchestrator: ChainOrchestrator::new(handler, backfill_sync) }
|
||||
}
|
||||
|
||||
/// Returns a mutable reference to the orchestrator.
|
||||
pub fn orchestrator_mut(&mut self) -> &mut EthServiceType<DB, Client> {
|
||||
&mut self.orchestrator
|
||||
}
|
||||
}
|
||||
|
||||
impl<DB, Client> Stream for EthService<DB, Client>
|
||||
|
||||
@@ -146,8 +146,7 @@ where
|
||||
|
||||
let pipeline_events = pipeline.events();
|
||||
|
||||
// TODO: support --debug.tip
|
||||
let _initial_target = ctx.node_config().debug.tip;
|
||||
let initial_target = ctx.node_config().debug.tip;
|
||||
|
||||
let mut pruner_builder = ctx.pruner_builder();
|
||||
if let Some(exex_manager_handle) = &exex_manager_handle {
|
||||
@@ -237,6 +236,11 @@ where
|
||||
let (tx, rx) = oneshot::channel();
|
||||
info!(target: "reth::cli", "Starting consensus engine");
|
||||
ctx.task_executor().spawn_critical_blocking("consensus engine", async move {
|
||||
if let Some(initial_target) = initial_target {
|
||||
debug!(target: "reth::cli", %initial_target, "start backfill sync");
|
||||
eth_service.orchestrator_mut().start_backfill_sync(initial_target);
|
||||
}
|
||||
|
||||
// advance the chain and handle events
|
||||
while let Some(event) = eth_service.next().await {
|
||||
debug!(target: "reth::cli", "Event: {event:?}");
|
||||
|
||||
Reference in New Issue
Block a user