Skip to content
Open
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
10 changes: 6 additions & 4 deletions substrate/client/network/sync/src/strategy/chain_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,12 @@ where
return None;
}

// The node is continuing a known fork if either the block itself is known, the
// parent is known or the block references the previously announced `best_hash`.
let continues_known_fork =
known || known_parent || announce.header.parent_hash() == &peer.best_hash;
// The node is continuing a known fork if either the block itself is know or the
// parent is known.
//
// We cannot follow the fork by simply looking at the peer best hash, since that
// can be re-announced by the peer from a different fork entirely.
let continues_known_fork = known || known_parent;

let peer_info = is_best.then(|| {
// update their best block
Expand Down
Loading