Refactor Sync status updates into a stream of updates (#1858)

* refactor sync provider

* relative use of interval

* typo

* set propagate timeout to 2500ms

* address comments

* fix instant calc

* update intervals
This commit is contained in:
Gregory Terzian
2019-03-02 21:35:16 +08:00
committed by Gav Wood
parent 828cd9580a
commit a81f7f48a0
9 changed files with 90 additions and 54 deletions
+2 -2
View File
@@ -181,7 +181,7 @@ pub fn connectivity<F: ServiceFactory>(spec: FactoryChainSpec<F>) {
service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer");
}
network.run_until_all_full(|_index, service|
service.network().status().num_peers == NUM_NODES as usize - 1
service.network().peers().len() == NUM_NODES as usize - 1
);
network.runtime
};
@@ -201,7 +201,7 @@ pub fn connectivity<F: ServiceFactory>(spec: FactoryChainSpec<F>) {
address = service.network().node_id().expect("No node address");
}
network.run_until_all_full(|_index, service| {
service.network().status().num_peers == NUM_NODES as usize - 1
service.network().peers().len() == NUM_NODES as usize - 1
});
}
temp.close().expect("Error removing temp dir");