Skip to content

Commit

Permalink
fix: cursor advancing
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Jul 18, 2024
1 parent b658650 commit b2e18ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions crates/derive/src/stages/batch_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion examples/trusted-sync/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) => {
Expand Down

0 comments on commit b2e18ce

Please sign in to comment.