mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Update networking code to libp2p 0.14 (#4383)
* Entirely update substrate-telemetry to futures 0.3 * Add a Closed error * Update to libp2p 0.14 * More work * More work * More work * More work * Fix warnings * Remove unwrap() * Work on tests fixing * Fix network tests * Fix external network tests * Update libp2p and restore Yamux in discovery test * Ignore DNS if initializatio nfails * Restore variables ordering * Forgot browser-utils * Fix downfall after merge * Fix tests
This commit is contained in:
committed by
Gavin Wood
parent
6e572a9477
commit
ca997cf1e4
@@ -27,7 +27,7 @@ pub mod error;
|
||||
mod builder;
|
||||
mod status_sinks;
|
||||
|
||||
use std::io;
|
||||
use std::{io, pin::Pin};
|
||||
use std::marker::PhantomData;
|
||||
use std::net::SocketAddr;
|
||||
use std::collections::HashMap;
|
||||
@@ -479,7 +479,9 @@ fn build_network_future<
|
||||
});
|
||||
|
||||
// Main network polling.
|
||||
if let Ok(Async::Ready(())) = network.poll().map_err(|err| {
|
||||
let mut net_poll = futures03::future::poll_fn(|cx| futures03::future::Future::poll(Pin::new(&mut network), cx))
|
||||
.compat();
|
||||
if let Ok(Async::Ready(())) = net_poll.poll().map_err(|err| {
|
||||
warn!(target: "service", "Error in network: {:?}", err);
|
||||
}) {
|
||||
return Ok(Async::Ready(()));
|
||||
|
||||
Reference in New Issue
Block a user