Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion PR to #5763 - network polling #1029

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
8 changes: 6 additions & 2 deletions network/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,12 @@ pub trait TestNetFactory: Sized {
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();
loop {
let net_poll_future = peer.network.next_action();
futures::pin_mut!(net_poll_future);
if let Poll::Pending = net_poll_future.poll(cx) {
break;
}
}
trace!(target: "sync", "-- Polling complete {}", peer.id());

Expand Down