Skip to content

Commit

Permalink
Add NetworkService::add_known_address (paritytech#8467)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored and hirschenberger committed Apr 14, 2021
1 parent 8823362 commit fc2484c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit fc2484c

Please sign in to comment.