*: Update to next libp2p version 0.24.0 (#6891)

* *: Update to next libp2p version (likely v0.24.0)

* Revert "*: Update to next libp2p version (likely v0.24.0)"

This reverts commit ffe1545aba6c2557a2843579de331f3fc1c60743.

* */Cargo.toml: Update to libp2p v0.24.0

* client/network/src/service: Handle ConnectionClosed returning Option

* Cargo.*: Test kad usize conversion

* Revert "Cargo.*: Test kad usize conversion"

This reverts commit ad317879782f982cb4a4c76029a72b5b97e82bec.

* Cargo.lock: Update to libp2p-kad v0.22.1

* client/cli/Cargo.toml: Update to libp2p 0.24.0
This commit is contained in:
Max Inden
2020-08-21 08:25:23 +02:00
committed by GitHub
parent 09662dc873
commit 69e349bd51
12 changed files with 103 additions and 131 deletions
+10 -9
View File
@@ -1633,18 +1633,19 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
ConnectedPoint::Listener { .. } => "in",
};
let reason = match cause {
ConnectionError::IO(_) => "transport-error",
ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
Some(ConnectionError::IO(_)) => "transport-error",
Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
EitherError::A(EitherError::A(EitherError::B(
EitherError::A(PingFailure::Timeout)))))))) => "ping-timeout",
ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
EitherError::A(PingFailure::Timeout))))))))) => "ping-timeout",
Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
EitherError::A(EitherError::A(EitherError::A(
NotifsHandlerError::Legacy(LegacyConnectionKillError)))))))) => "force-closed",
ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
NotifsHandlerError::Legacy(LegacyConnectionKillError))))))))) => "force-closed",
Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
EitherError::A(EitherError::A(EitherError::A(
NotifsHandlerError::SyncNotificationsClogged))))))) => "sync-notifications-clogged",
ConnectionError::Handler(NodeHandlerWrapperError::Handler(_)) => "protocol-error",
ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout) => "keep-alive-timeout",
NotifsHandlerError::SyncNotificationsClogged)))))))) => "sync-notifications-clogged",
Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(_))) => "protocol-error",
Some(ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout)) => "keep-alive-timeout",
None => "actively-closed",
};
metrics.connections_closed_total.with_label_values(&[direction, reason]).inc();