diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 54a5559d2eaf9..bf3a86444b433 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -647,6 +647,13 @@ impl NetworkService { .unbounded_send(ServiceToWorkerMsg::SetReservedOnly(reserved_only)); } + /// Adds an address known to a node. + pub fn add_known_address(&mut self, peer_id: PeerId, addr: Multiaddr) { + let _ = self + .to_worker + .unbounded_send(ServiceToWorkerMsg::AddKnownAddress(peer_id, addr)); + } + /// Appends a notification to the buffer of pending outgoing notifications with the given peer. /// Has no effect if the notifications channel with this protocol name is not open. ///