From ef499834f9e908ff8f847c09795189a48f814761 Mon Sep 17 00:00:00 2001 From: rob-maron <132852777+rob-maron@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:11:11 -0400 Subject: [PATCH] update address on new peer (#3607) --- crates/libp2p-networking/src/network/node.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/libp2p-networking/src/network/node.rs b/crates/libp2p-networking/src/network/node.rs index 3ef40fbab8..7015825c34 100644 --- a/crates/libp2p-networking/src/network/node.rs +++ b/crates/libp2p-networking/src/network/node.rs @@ -764,6 +764,12 @@ impl NetworkNode { .dht .add_address(&my_id, address.clone()); } + SwarmEvent::NewExternalAddrOfPeer { peer_id, address } => { + self.swarm + .behaviour_mut() + .dht + .add_address(&peer_id, address.clone()); + } _ => { debug!("Unhandled swarm event {:?}", event); }