Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
network/test/src/lib: Adjust network worker polling
  • Loading branch information
mxinden committed Jul 2, 2020
commit 23f7d2854ef706916fae6f9ee0b374ec04f39eb4
6 changes: 3 additions & 3 deletions network/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,13 +758,13 @@ pub trait TestNetFactory: Sized {
futures::executor::block_on(futures::future::poll_fn::<(), _>(|cx| self.poll_until_idle(cx)));
}

/// Polls the testnet. Processes all the pending actions and returns `NotReady`.
/// Polls the testnet. Processes all the pending actions.
fn poll(&mut self, cx: &mut FutureContext) {
self.mut_peers(|peers| {
for peer in peers {
trace!(target: "sync", "-- Polling {}", peer.id());
if let Poll::Ready(res) = Pin::new(&mut peer.network).poll(cx) {
res.unwrap();
if let Poll::Ready(()) = peer.network.poll_unpin(cx) {
panic!("NetworkWorker has terminated unexpectedly.")
}
trace!(target: "sync", "-- Polling complete {}", peer.id());

Expand Down