Skip to content

Commit 0f0fb93

Browse files
teor2345dconnolly
authored andcommitted
Update some comments in zebra-network
Add ticket numbers, and update based on design decisions and new code.
1 parent 68e2942 commit 0f0fb93

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

zebra-network/src/peer/handshake.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ where
192192
let (tcp_stream, addr) = req;
193193

194194
let connector_span = span!(Level::INFO, "connector", addr = ?addr);
195-
// set parent: None for the peer connection span, as it should exist
196-
// independently of its creation source (inbound connection, crawler,
197-
// initial peer, ...)
195+
// set the peer connection span's parent to the global span, as it
196+
// should exist independently of its creation source (inbound
197+
// connection, crawler, initial peer, ...)
198198
let connection_span = span!(parent: &self.parent_span, Level::INFO, "peer", addr = ?addr);
199199

200200
// Clone these upfront, so they can be moved into the future.
@@ -315,12 +315,13 @@ where
315315
// auto currentEpoch = CurrentEpoch(GetHeight(), consensusParams);
316316
// if (pfrom->nVersion < consensusParams.vUpgrades[currentEpoch].nProtocolVersion)
317317
//
318-
// For approximately 1.5 days before a network upgrade, we also need to:
319-
// - avoid old peers, and
320-
// - prefer updated peers.
321-
// For example, we could reject old peers with probability 0.5.
318+
// For approximately 1.5 days before a network upgrade, zcashd also:
319+
// - avoids old peers, and
320+
// - prefers updated peers.
321+
// We haven't decided if we need this behaviour in Zebra yet (see #706).
322+
//
323+
// At the network upgrade, we also need to disconnect from old peers (see #1334).
322324
//
323-
// At the network upgrade, we also need to disconnect from old peers.
324325
// TODO: replace min_for_upgrade(network, MIN_NETWORK_UPGRADE) with
325326
// current_min(network, height) where network is the
326327
// configured network, and height is the best tip's block

0 commit comments

Comments
 (0)