diff --git a/substrate/client/network/src/service.rs b/substrate/client/network/src/service.rs index 54a5559d2eaf9db066a7b8afc97eaee88b45cafa..bf3a86444b433371a48a83ccf263e7124d653655 100644 --- a/substrate/client/network/src/service.rs +++ b/substrate/client/network/src/service.rs @@ -647,6 +647,13 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkService<B, H> { .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. ///