Skip to content

Commit

Permalink
chore: remove unnecessary addition of external address
Browse files Browse the repository at this point in the history
  • Loading branch information
fbozic committed May 20, 2024
1 parent b64b015 commit d8baa1a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- chore/remove-unnecessary-address-addition
permissions: write-all
jobs:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "examples/dcutr", "examples/chat"]

[package]
name = "boot-node"
version = "0.5.0"
version = "0.6.0"
authors = ["Calimero Limited <[email protected]>"]
edition = "2021"
repository = "https://github.com/calimero-network/boot-node"
Expand Down
12 changes: 1 addition & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,13 @@ async fn handle_swarm_event(swarm: &mut Swarm<Behaviour>, event: SwarmEvent<Beha
}
}

async fn handle_swarm_behaviour_event(swarm: &mut Swarm<Behaviour>, event: BehaviourEvent) {
async fn handle_swarm_behaviour_event(_: &mut Swarm<Behaviour>, 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:?}");
Expand Down

0 comments on commit d8baa1a

Please sign in to comment.