Skip to content

Commit

Permalink
Restrict candidate peers
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Dec 2, 2021
1 parent 54000f0 commit a4f6936
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/network/peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ impl<N: Network, E: Environment> Peers<N, E> {

// Add the sync nodes to the list of candidate peers.
let sync_nodes: Vec<SocketAddr> = E::SYNC_NODES.iter().map(|ip| ip.parse().unwrap()).collect();
self.add_candidate_peers(&sync_nodes).await;
if number_of_connected_sync_nodes == 0 {
self.add_candidate_peers(&sync_nodes).await;
}

// Add the beacon nodes to the list of candidate peers.
let beacon_nodes: Vec<SocketAddr> = E::BEACON_NODES.iter().map(|ip| ip.parse().unwrap()).collect();
Expand Down

0 comments on commit a4f6936

Please sign in to comment.