mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Fixed test block conditions (#3332)
This commit is contained in:
committed by
Bastian Köcher
parent
58bd0d4c05
commit
c0fd256c01
@@ -591,6 +591,9 @@ pub trait TestNetFactory: Sized {
|
||||
// Return `NotReady` if there's a mismatch in the highest block number.
|
||||
let mut highest = None;
|
||||
for peer in self.peers().iter() {
|
||||
if peer.is_major_syncing() || peer.network.num_queued_blocks() != 0 {
|
||||
return Async::NotReady
|
||||
}
|
||||
match (highest, peer.client.info().chain.best_number) {
|
||||
(None, b) => highest = Some(b),
|
||||
(Some(ref a), ref b) if a == b => {},
|
||||
|
||||
Reference in New Issue
Block a user