Skip to content

Commit

Permalink
Don't dial direct node address on startup, rely on scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Jun 18, 2024
1 parent c55ece8 commit 01a91ca
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions aquadoggo/src/network/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,29 +167,6 @@ pub async fn network_service(
);
}
}

// Dial all nodes we want to directly connect to.
for direct_node_address in network_config.direct_node_addresses.iter_mut() {
info!("Connecting to node @ {}", direct_node_address);

let direct_node_address = match direct_node_address.quic_multiaddr() {
Ok(address) => address,
Err(e) => {
debug!("Failed to resolve direct node multiaddr: {}", e.to_string());
continue;
}
};

let opts = DialOpts::unknown_peer_id()
.address(direct_node_address.clone())
.build();

match swarm.dial(opts) {
Ok(_) => (),
Err(err) => debug!("Error dialing node: {:?}", err),
};
}

info!("Network service ready!");

// Spawn main event loop handling all p2panda and libp2p network events.
Expand Down

0 comments on commit 01a91ca

Please sign in to comment.