*: Update to libp2p v0.32.0 (#7696)

* *: Update to libp2p v0.32.0

* Cargo.lock: Update async-tls to 0.10.2

* client/network/request_response: Adjust to new request response events

* client/network/request_response.rs: Clean up silently failing responses

* client/network/discovery: Lazily instantiate mdns

* client/network/discovery: Exclude MdnsWrapper for target_os unknown

* client/network/discovery: Fix indentation

* client/network/request-response: Use LruCache to track pending resp time

* client/network/request_responses: Fix early connection closed error

* client/network/request-response: Replace debug_assert with debug

* client/network/request-response: Fix typo

* client/network/request-response: Don't emit event on send_response fail

* client/network/request-response: Revert waker.wake_by_ref()

* client/network/request-resp: Make duration in InboundRequest optional

* client/network/req-resp: Don't emit two events for busy builder

When a response builder is busy incoming requests are dropped.
Previously this was reported both via a `ResponseFailure::Busy` and a
`ReponseFailure::Network(InboundFailure::Omisssion)` event.

With this commit the former is removed, leaving only the latter in
place.
This commit is contained in:
Max Inden
2020-12-09 22:58:22 +01:00
committed by GitHub
parent b29d6092c2
commit 0a2636d20c
14 changed files with 225 additions and 131 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ pub enum BehaviourOut<B: BlockT> {
protocol: Cow<'static, str>,
/// If `Ok`, contains the time elapsed between when we received the request and when we
/// sent back the response. If `Err`, the error that happened.
result: Result<Duration, ResponseFailure>,
result: Result<Option<Duration>, ResponseFailure>,
},
/// A request initiated using [`Behaviour::send_request`] has succeeded or failed.
@@ -417,7 +417,7 @@ impl<B: BlockT, H: ExHashT> NetworkBehaviourEventProcess<block_requests::Event<B
self.events.push_back(BehaviourOut::InboundRequest {
peer,
protocol: self.block_requests.protocol_name().to_owned().into(),
result: Ok(total_handling_time),
result: Ok(Some(total_handling_time)),
});
},
block_requests::Event::Response { peer, response, request_duration } => {