Skip to content

Commit

Permalink
Merge pull request #2221 from subspace/default-to-dynamic-kademlia-mode
Browse files Browse the repository at this point in the history
Default to dynamic Kademlia mode
  • Loading branch information
nazar-pc authored Nov 12, 2023
2 parents 0f65f43 + 8914cb5 commit d578abc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion crates/subspace-networking/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ where
general_target_connections: SWARM_TARGET_CONNECTION_NUMBER,
special_target_connections: SWARM_TARGET_CONNECTION_NUMBER,
bootstrap_addresses: Vec::new(),
kademlia_mode: KademliaMode::Static(Mode::Client),
kademlia_mode: KademliaMode::Dynamic {
initial_mode: Mode::Client,
},
external_addresses: Vec::new(),
enable_autonat: true,
disable_bootstrap_on_start: false,
Expand Down
5 changes: 1 addition & 4 deletions crates/subspace-networking/src/node_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,10 +1334,7 @@ where
}
}
Ok(false) => {
panic!(
"Logic error, topic subscription wasn't created, this must never \
happen"
);
panic!("Logic error, topic subscription wasn't created, this must never happen");
}
Err(error) => {
let _ = result_sender.send(Err(error));
Expand Down
4 changes: 3 additions & 1 deletion crates/subspace-service/src/dsn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ where
general_connected_peers_handler: Some(Arc::new(|_| true)),
bootstrap_addresses: dsn_config.bootstrap_nodes,
external_addresses: dsn_config.external_addresses,
kademlia_mode: KademliaMode::Static(Mode::Client),
kademlia_mode: KademliaMode::Dynamic {
initial_mode: Mode::Client,
},
metrics,
disable_bootstrap_on_start: dsn_config.disable_bootstrap_on_start,

Expand Down

0 comments on commit d578abc

Please sign in to comment.