Skip to content

Commit

Permalink
Fix a comment in add_initial_peers
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 authored and dconnolly committed Jun 21, 2021
1 parent b999b09 commit 4ce3563
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions zebra-network/src/peer_set/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,16 @@ where
S::Future: Send + 'static,
{
info!(?initial_peers, "connecting to initial peer set");
// ## Correctness:
// # Security
//
// Each `CallAll` can hold one `Buffer` or `Batch` reservation for
// an indefinite period. We can use `CallAllUnordered` without filling
// the underlying `Inbound` buffer, because we immediately drive this
// single `CallAll` to completion, and handshakes have a short timeout.
// TODO: rate-limit initial seed peer connections (#2326)
//
// # Correctness
//
// Each `FuturesUnordered` can hold one `Buffer` or `Batch` reservation for
// an indefinite period. We can use `FuturesUnordered` without filling
// the underlying network buffers, because we immediately drive this
// single `FuturesUnordered` to completion, and handshakes have a short timeout.
let mut handshakes: FuturesUnordered<_> = initial_peers
.into_iter()
.map(|addr| {
Expand Down

0 comments on commit 4ce3563

Please sign in to comment.