Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Do not downgrade previously synced peer to not synced
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Dec 15, 2022
1 parent 6d57dbc commit 60bcb62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/network/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,10 @@ where
// update their best block
peer.best_number = number;
peer.best_hash = hash;
peer.is_synced = is_synced;
// Do not update synced status back to not synced. Announcements only happen
// occasionally and it is unlikely that actively connected peer will become not synced
// after being synced previously anyway.
peer.is_synced = peer.is_synced || is_synced;
}

// If the announced block is the best they have and is not ahead of us, our common number
Expand Down

0 comments on commit 60bcb62

Please sign in to comment.