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
@@ -317,6 +317,7 @@ mod tests {
};
use quickcheck::{Arbitrary, Gen, QuickCheck};
use sc_network_common::{
config::MultiaddrWithPeerId,
protocol::event::ObservedRole,
service::{
NetworkBlock, NetworkEventStream, NetworkNotification, NetworkPeers,
@@ -371,7 +372,7 @@ mod tests {
unimplemented!();
}
fn add_reserved_peer(&self, _peer: String) -> Result<(), String> {
fn add_reserved_peer(&self, _peer: MultiaddrWithPeerId) -> Result<(), String> {
unimplemented!();
}
@@ -514,6 +514,7 @@ mod tests {
use crate::multiaddr::Multiaddr;
use futures::prelude::*;
use sc_network_common::{
config::MultiaddrWithPeerId,
protocol::event::Event,
service::{
NetworkBlock, NetworkEventStream, NetworkNotification, NetworkPeers,
@@ -610,7 +611,7 @@ mod tests {
unimplemented!();
}
fn add_reserved_peer(&self, _peer: String) -> Result<(), String> {
fn add_reserved_peer(&self, _peer: MultiaddrWithPeerId) -> Result<(), String> {
unimplemented!();
}