Make NetworkService::add_reserved_peer() accept MultiaddrWithPeerId (#12102)

* Make `add_reserved_peer()` accept `MultiaddrWithPeerId`

* minor: cargo fmt

* minor: error to string conversion

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Dmitry Markin
2022-08-29 14:54:57 +03:00
committed by GitHub
parent 674e73caf0
commit 224562729d
9 changed files with 49 additions and 34 deletions
@@ -27,6 +27,7 @@ use futures::prelude::*;
use parity_scale_codec::Encode;
use sc_network::{config::Role, Multiaddr, PeerId, ReputationChange};
use sc_network_common::{
config::MultiaddrWithPeerId,
protocol::event::{Event as NetworkEvent, ObservedRole},
service::{
NetworkBlock, NetworkEventStream, NetworkNotification, NetworkPeers,
@@ -87,7 +88,7 @@ impl NetworkPeers for TestNetwork {
unimplemented!();
}
fn add_reserved_peer(&self, _peer: String) -> Result<(), String> {
fn add_reserved_peer(&self, _peer: MultiaddrWithPeerId) -> Result<(), String> {
unimplemented!();
}