Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 28b1434

Browse files
author
parity-processbot
committed
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomination-staking-rpc-methods
2 parents eb28218 + 76208c8 commit 28b1434

File tree

15 files changed

+924
-757
lines changed

15 files changed

+924
-757
lines changed

client/authority-discovery/src/worker/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ impl NetworkStateInfo for TestNetwork {
184184
fn external_addresses(&self) -> Vec<Multiaddr> {
185185
self.external_addresses.clone()
186186
}
187+
188+
fn listen_addresses(&self) -> Vec<Multiaddr> {
189+
self.external_addresses.clone()
190+
}
187191
}
188192

189193
struct TestSigner<'a> {

client/network/common/src/service.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ pub trait NetworkPeers {
180180
/// purposes.
181181
fn deny_unreserved_peers(&self);
182182

183-
/// Adds a `PeerId` and its `Multiaddr` as reserved.
183+
/// Adds a `PeerId` and its `Multiaddr` as reserved for a sync protocol (default peer set).
184184
///
185185
/// Returns an `Err` if the given string is not a valid multiaddress
186186
/// or contains an invalid peer ID (which includes the local peer ID).
187187
fn add_reserved_peer(&self, peer: MultiaddrWithPeerId) -> Result<(), String>;
188188

189-
/// Removes a `PeerId` from the list of reserved peers.
189+
/// Removes a `PeerId` from the list of reserved peers for a sync protocol (default peer set).
190190
fn remove_reserved_peer(&self, peer_id: PeerId);
191191

192192
/// Sets the reserved set of a protocol to the given set of peers.
@@ -359,6 +359,9 @@ pub trait NetworkStateInfo {
359359
/// Returns the local external addresses.
360360
fn external_addresses(&self) -> Vec<Multiaddr>;
361361

362+
/// Returns the listening addresses (without trailing `/p2p/` with our `PeerId`).
363+
fn listen_addresses(&self) -> Vec<Multiaddr>;
364+
362365
/// Returns the local Peer ID.
363366
fn local_peer_id(&self) -> PeerId;
364367
}
@@ -372,6 +375,10 @@ where
372375
T::external_addresses(self)
373376
}
374377

378+
fn listen_addresses(&self) -> Vec<Multiaddr> {
379+
T::listen_addresses(self)
380+
}
381+
375382
fn local_peer_id(&self) -> PeerId {
376383
T::local_peer_id(self)
377384
}

0 commit comments

Comments
 (0)