feat(cli): allow running pipeline up to --debug.max-block (#1175)

This commit is contained in:
Georgios Konstantopoulos
2023-02-04 19:21:58 -08:00
committed by GitHub
parent 2ef24b3b65
commit e46d0401a2

View File

@@ -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(