Skip to content

Commit

Permalink
Allow some persistent connections on boostrap node
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Nov 13, 2023
1 parent 9cc0fd2 commit 64f2a8a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,12 @@ async fn main() -> Result<(), Box<dyn Error>> {
max_established_outgoing_connections: out_peers,
max_pending_incoming_connections: pending_in_peers,
max_pending_outgoing_connections: pending_out_peers,
// we don't maintain permanent connections with any peer
general_connected_peers_handler: None,
special_connected_peers_handler: None,
// Maintain proactive connections with all peers
general_connected_peers_handler: Some(Arc::new(|_| true)),
// Maintain some number of persistent connections
general_connected_peers_target: in_peers / 8,
// Allow some more persistent connections from other peers
general_connected_peers_limit: in_peers / 4,
bootstrap_addresses: bootstrap_nodes,
kademlia_mode: KademliaMode::Static(Mode::Server),
external_addresses,
Expand Down

0 comments on commit 64f2a8a

Please sign in to comment.