Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(en): support for snapshots recovery in version_sync_task.rs #1585

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/bin/external_node/src/version_sync_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ pub async fn sync_versions(
// Uses binary search.
let mut left_bound = L1BatchNumber(0);
let mut right_bound = local_first_v22_l1_batch;
let snapshot_recovery = connection
.snapshot_recovery_dal()
.get_applied_snapshot_status()
.await?;
if let Some(snapshot_recovery) = snapshot_recovery {
left_bound = L1BatchNumber(snapshot_recovery.l1_batch_number.0 + 1)
}

let right_bound_remote_version =
get_l1_batch_remote_protocol_version(&main_node_client, right_bound).await?;
Expand Down
Loading