Skip to content

Commit

Permalink
add best block to syncing tips
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadkaouk committed Mar 12, 2024
1 parent 8c90bb7 commit 79bfedf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/mapping-sync/src/kv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ where
current_syncing_tips.append(&mut leaves);
}

let best_hash = client.info().best_hash;
if SyncStrategy::Parachain == strategy
&& !frontier_backend
.mapping()
.is_synced(&best_hash)?
{
// Add best block to current_syncing_tips
current_syncing_tips.push(best_hash);
}

let mut operating_header = None;
while let Some(checking_tip) = current_syncing_tips.pop() {
if let Some(checking_header) = fetch_header(
Expand Down

0 comments on commit 79bfedf

Please sign in to comment.