From 8e5b4e382613072f48175f28a1260af017d1c402 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Tue, 19 Oct 2021 19:52:50 +0200 Subject: [PATCH] Slightly improved documentation. (#9976) Co-authored-by: Pierre Krieger Co-authored-by: Giles Cope --- substrate/client/network/src/service.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/substrate/client/network/src/service.rs b/substrate/client/network/src/service.rs index 9b6e54f37a..90e647505f 100644 --- a/substrate/client/network/src/service.rs +++ b/substrate/client/network/src/service.rs @@ -1097,6 +1097,15 @@ impl NetworkService { /// Each `Multiaddr` must end with a `/p2p/` component containing the `PeerId`. It can also /// consist of only `/p2p/`. /// + /// The node will start establishing/accepting connections and substreams to/from peers in this + /// set, if it doesn't have any substream open with them yet. + /// + /// Note however, if a call to this function results in less peers on the reserved set, they + /// will not necessarily get disconnected (depending on available free slots in the peer set). + /// If you want to also disconnect those removed peers, you will have to call + /// `remove_from_peers_set` on those in addition to updating the reserved set. You can omit + /// this step if the peer set is in reserved only mode. + /// /// Returns an `Err` if one of the given addresses is invalid or contains an /// invalid peer ID (which includes the local peer ID). pub fn set_reserved_peers(