From 32d05ece7ed24c82f100a72c86aabf714106ba4f Mon Sep 17 00:00:00 2001 From: StemCll Date: Wed, 24 Jan 2024 22:09:03 +0100 Subject: [PATCH] feat(swarm): allow behaviours to share addresses of peers Resolves: #4302. Pull-Request: #4371. --- Cargo.toml | 2 +- src/behaviour.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a1ecae7ccab..fce64ad0c12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ name = "libp2p-autonat" edition = "2021" rust-version = { workspace = true } description = "NAT and firewall detection for libp2p" -version = "0.12.0" authors = ["David Craven ", "Elena Frank "] +version = "0.12.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/src/behaviour.rs b/src/behaviour.rs index e95163ab23f..a770e61e88a 100644 --- a/src/behaviour.rs +++ b/src/behaviour.rs @@ -268,6 +268,7 @@ impl Behaviour { pub fn add_server(&mut self, peer: PeerId, address: Option) { self.servers.insert(peer); if let Some(addr) = address { + #[allow(deprecated)] self.inner.add_address(&peer, addr); } }