mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 03:21:06 +00:00
Prioritize new blocks over old forks when syncing (#4414)
* Prioritize new blocks over old forks when syncing * Fixed some test cases
This commit is contained in:
committed by
Gavin Wood
parent
6d8b99cf5e
commit
6e572a9477
@@ -689,6 +689,9 @@ pub trait TestNetFactory: Sized {
|
||||
if peer.is_major_syncing() || peer.network.num_queued_blocks() != 0 {
|
||||
return Async::NotReady
|
||||
}
|
||||
if peer.network.num_sync_requests() != 0 {
|
||||
return Async::NotReady
|
||||
}
|
||||
match (highest, peer.client.info().best_hash) {
|
||||
(None, b) => highest = Some(b),
|
||||
(Some(ref a), ref b) if a == b => {},
|
||||
|
||||
Reference in New Issue
Block a user