diff options
| author | tv <tv@krebsco.de> | 2026-11-01 23:08:48 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 23:08:48 +0100 |
| commit | 7ca6a00cd3581e00686682af9010587028170cd5 (patch) | |
| tree | 986ea138b3606ee4c8cb16b9dd05b8c3a8c23fda /src/transport/mod.rs | |
| parent | 7c58f3d8bfa87cfbc6c89ae34780e81b5ff47e0d (diff) | |
probe when reachable
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 1de0633..96f7651 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -831,6 +831,13 @@ pub(crate) trait Transport: Send + Sync { let _ = found; } + /// Has the transport tell `reachable` whenever others may reach this node where they + /// couldn't before (libp2p: a relay granted it a slot, or AutoNAT found it public). + /// By default it never does. + fn on_reachable(&self, reachable: std::sync::Arc<tokio::sync::Notify>) { + let _ = reachable; + } + /// 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`. |
