Companion for paritytech/substrate#13592 (#6869)

* Move configs

* Start using `NetworkService` traits from `sc-network`

* Fix stuff

* Remove `sc-network-common` as dependency

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Aaro Altonen
2023-03-14 14:52:15 +02:00
committed by GitHub
parent 5565bb9dbc
commit 0e1c932c42
9 changed files with 212 additions and 212 deletions
+6 -9
View File
@@ -22,13 +22,9 @@ use futures::{prelude::*, stream::BoxStream};
use parity_scale_codec::Encode;
use sc_network::{
multiaddr::Multiaddr, Event as NetworkEvent, IfDisconnected, NetworkService, OutboundFailure,
RequestFailure,
};
use sc_network_common::{
config::parse_addr,
protocol::ProtocolName,
service::{NetworkEventStream, NetworkNotification, NetworkPeers, NetworkRequest},
config::parse_addr, multiaddr::Multiaddr, types::ProtocolName, Event as NetworkEvent,
IfDisconnected, NetworkEventStream, NetworkNotification, NetworkPeers, NetworkRequest,
NetworkService, OutboundFailure, RequestFailure,
};
use polkadot_node_network_protocol::{
@@ -193,8 +189,9 @@ impl Network for Arc<NetworkService<Block, Hash>> {
match pending_response
.send(Err(RequestFailure::Network(OutboundFailure::DialFailure)))
{
Err(_) =>
gum::debug!(target: LOG_TARGET, "Sending failed request response failed."),
Err(_) => {
gum::debug!(target: LOG_TARGET, "Sending failed request response failed.")
},
Ok(_) => {},
}
return