From e46d0401a21fd67c865e81bb9cf306bedc4d541d Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Sat, 4 Feb 2023 19:21:58 -0800 Subject: [PATCH] feat(cli): allow running pipeline up to --debug.max-block (#1175) --- bin/reth/src/node/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index ce6a872075..6e7f820030 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -80,6 +80,10 @@ pub struct Command { #[arg(long, default_value = "any")] nat: NatResolver, + + /// Runs the sync only up to the specified block + #[arg(long = "debug.max-block", help_heading = "Debug")] + max_block: u64, } impl Command { @@ -200,6 +204,7 @@ impl Command { let stage_conf = &config.stages; let pipeline = Pipeline::builder() + .with_max_block(self.max_block) .with_sync_state_updater(network.clone()) .add_stages( OnlineStages::new(consensus.clone(), header_downloader, body_downloader).set(