Skip to content

Commit

Permalink
feat(en): support for snapshots recovery in version_sync_task.rs (mat…
Browse files Browse the repository at this point in the history
…ter-labs#1585)

Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 authored Apr 5, 2024
1 parent bdd3617 commit f911276
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit f911276

Please sign in to comment.