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
+5 -2
View File
@@ -326,7 +326,10 @@ mod tests {
use super::*;
use libp2p::PeerId;
use sc_client_db::offchain::LocalStorage;
use sc_network_common::service::{NetworkPeers, NetworkStateInfo};
use sc_network_common::{
config::MultiaddrWithPeerId,
service::{NetworkPeers, NetworkStateInfo},
};
use sc_peerset::ReputationChange;
use sp_core::offchain::{DbExternalities, Externalities};
use std::{borrow::Cow, time::SystemTime};
@@ -362,7 +365,7 @@ mod tests {
unimplemented!();
}
fn add_reserved_peer(&self, _peer: String) -> Result<(), String> {
fn add_reserved_peer(&self, _peer: MultiaddrWithPeerId) -> Result<(), String> {
unimplemented!();
}