From 2c0416d53a17400e3c796a6a1e4e196aa5318c56 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 14:03:53 +0100 Subject: add support for renaming IDs in the logger --- src/transport/identity.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/transport/identity.rs') diff --git a/src/transport/identity.rs b/src/transport/identity.rs index 502c6b3..432348e 100644 --- a/src/transport/identity.rs +++ b/src/transport/identity.rs @@ -474,6 +474,20 @@ impl Transport for IdentityTransport { self.shared.paths.local_addresses() } + fn identities_of(&self, peer: &str) -> Vec { + if peer == self.shared.node_id { + return self.shared.paths.own_addresses(); + } + let book = self.shared.lock(); + let mut addresses = book.proven.get(peer).cloned().unwrap_or_default(); + for hint in book.hints.get(peer).into_iter().flatten() { + if !addresses.contains(hint) { + addresses.push(hint.clone()); + } + } + addresses + } + /// Where `peer` proved itself, else where it is said to be, as others can use it. fn addresses_of(&self, peer: &str) -> Vec { let addresses = { -- cgit v1.3.1