Update to libp2p-0.23. (#6870)

* Update to libp2p-0.23.

Thereby incorporate bandwidth measurement along the
lines previously done by libp2p itself.

* Tweak dependencies for wasm32 compilation.

For wasm32 we need to enable unstable features to
make `task::Builder::local` available.

* Simplify dependencies.

* Simplify.

Leave the calculation of bytes sent/received per second
to the outer layers of the code, subject to their own
individual update intervals.

* Cleanup

* Re-add lost dev dependency.

* Avoid division by zero.

* Remove redundant metric.

* Enable sending of noise legacy handshakes.

* Add comment about monotonic gauge.

* CI
This commit is contained in:
Roman Borschel
2020-08-14 10:41:47 +02:00
committed by GitHub
parent f94aae1d2d
commit 327e02942c
18 changed files with 129 additions and 75 deletions
+4 -4
View File
@@ -309,8 +309,8 @@ pub struct NetworkStatus<B: BlockT> {
pub num_connected_peers: usize,
/// Total number of active peers.
pub num_active_peers: usize,
/// Downloaded bytes per second averaged over the past few seconds.
pub average_download_per_sec: u64,
/// Uploaded bytes per second averaged over the past few seconds.
pub average_upload_per_sec: u64,
/// The total number of bytes received.
pub total_bytes_inbound: u64,
/// The total number of bytes sent.
pub total_bytes_outbound: u64,
}