From b2e18ce7e3ded5a90a15d7da443b27bdd645a811 Mon Sep 17 00:00:00 2001 From: refcell Date: Thu, 18 Jul 2024 12:52:16 -0400 Subject: [PATCH] fix: cursor advancing --- crates/derive/src/stages/batch_queue.rs | 3 --- examples/trusted-sync/src/main.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/derive/src/stages/batch_queue.rs b/crates/derive/src/stages/batch_queue.rs index 654991984..19299e67a 100644 --- a/crates/derive/src/stages/batch_queue.rs +++ b/crates/derive/src/stages/batch_queue.rs @@ -443,9 +443,6 @@ where { async fn reset(&mut self, base: BlockInfo, system_config: &SystemConfig) -> StageResult<()> { self.prev.reset(base, system_config).await?; - // Copy over the Origin from the next stage. - // It is set in the engine queue (two stages away) - // such that the L2 Safe Head origin is the progress. self.origin = Some(base); self.batches.clear(); // Include the new origin as an origin to build on. diff --git a/examples/trusted-sync/src/main.rs b/examples/trusted-sync/src/main.rs index bb32a77ed..48ee94095 100644 --- a/examples/trusted-sync/src/main.rs +++ b/examples/trusted-sync/src/main.rs @@ -142,6 +142,7 @@ async fn sync(cli: cli::Cli) -> Result<()> { continue; } cursor = c; + advance_cursor_flag = false; } else { error!(target: LOG_TARGET, "Failed to get block info by number: {}", latest - 100); continue; @@ -166,12 +167,12 @@ async fn sync(cli: cli::Cli) -> Result<()> { continue; } cursor = c; + advance_cursor_flag = false; } else { error!(target: LOG_TARGET, "Failed to get walkback block info by number: {}", cursor.block_info.number - 10); continue; } } - advance_cursor_flag = false; } } Err(e) => {