mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 17:57:56 +00:00
sync: fix peer common number on block announce (#3410)
This commit is contained in:
@@ -922,10 +922,10 @@ impl<B: BlockT> ChainSync<B> {
|
||||
}
|
||||
// We assume that the announced block is the latest they have seen, and so our common number
|
||||
// is either one further ahead or it's the one they just announced, if we know about it.
|
||||
if header.parent_hash() == &self.best_queued_hash || known_parent {
|
||||
peer.common_number = number - One::one();
|
||||
} else if known {
|
||||
if known {
|
||||
peer.common_number = number
|
||||
} else if header.parent_hash() == &self.best_queued_hash || known_parent {
|
||||
peer.common_number = number - One::one();
|
||||
}
|
||||
self.is_idle = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user