Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/networking/p2p/discv4/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl DiscoveryServer {
// Sending all in one packet would exceed bounds with the nodes only, weighing
// up to 1424B.
for chunk in neighbors.chunks(8) {
let _ = self.send_neighbors(chunk.to_vec(), &contact.node).await;
self.send_neighbors(chunk.to_vec(), &contact.node).await?;
}
}
Ok(())
Expand All @@ -406,9 +406,13 @@ impl DiscoveryServer {
neighbors_message: NeighborsMessage,
) -> Result<(), DiscoveryServerError> {
// TODO(#3746): check that we requested neighbors from the node
let nodes = neighbors_message.nodes.clone();
self.peer_table
.new_contacts(neighbors_message.nodes, self.local_node.node_id())
.new_contacts(nodes, self.local_node.node_id())
.await?;
for node in neighbors_message.nodes {
self.send_ping(&node).await?;
}
Ok(())
}

Expand Down