From d8baa1a98143179a918bced4eb00dc7908bcf2e6 Mon Sep 17 00:00:00 2001 From: Filip Bozic <70634661+fbozic@users.noreply.github.com> Date: Mon, 20 May 2024 19:46:00 +0200 Subject: [PATCH] chore: remove unnecessary addition of external address --- .github/workflows/release.yml | 1 + Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 12 +----------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3eecc2..16153b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - chore/remove-unnecessary-address-addition permissions: write-all jobs: metadata: diff --git a/Cargo.lock b/Cargo.lock index ba8637a..e53a74b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -346,7 +346,7 @@ dependencies = [ [[package]] name = "boot-node" -version = "0.5.0" +version = "0.6.0" dependencies = [ "camino", "clap", diff --git a/Cargo.toml b/Cargo.toml index dc151a6..a02051c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "examples/dcutr", "examples/chat"] [package] name = "boot-node" -version = "0.5.0" +version = "0.6.0" authors = ["Calimero Limited "] edition = "2021" repository = "https://github.com/calimero-network/boot-node" diff --git a/src/main.rs b/src/main.rs index 333fba8..3677b8c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -129,23 +129,13 @@ async fn handle_swarm_event(swarm: &mut Swarm, event: SwarmEvent, event: BehaviourEvent) { +async fn handle_swarm_behaviour_event(_: &mut Swarm, event: BehaviourEvent) { match event { BehaviourEvent::Autonat(event) => { info!("AutoNat event: {event:?}"); } BehaviourEvent::Identify(event) => { info!("Identify event: {event:?}"); - match event { - identify::Event::Received { - info: identify::Info { observed_addr, .. }, - .. - } => { - info!("Adding external address: {observed_addr:?}"); - swarm.add_external_address(observed_addr); - } - _ => {} - } } BehaviourEvent::Kad(event) => { info!("Kad event: {event:?}");