diff options
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 52db406..cbbef45 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -537,6 +537,14 @@ pub(crate) trait Transport: Send + Sync { vec![peer.to_owned()] } + /// Whether this node has a way to reach `peer` at all: an address of it on one of + /// its transports. Members it can't reach aren't its neighbours (`swarm::topology`). + /// By default yes, as for `local_addresses`. + fn can_reach(&self, peer: &str) -> bool { + let _ = peer; + true + } + /// Where others say `peer` can be reached (the member list, a HELLO_REPLY): hints, /// to be checked before they are relied on. By default nothing to learn, as for /// `local_addresses`. |
