From ebde946a527e50630df180c6565ea5bf8d2ab5aa Mon Sep 17 00:00:00 2001 From: Amiti Uttarwar Date: Mon, 8 Mar 2021 18:17:48 -0800 Subject: [PATCH] [doc] Improve comment about protected peers The comment currently suggests a long-standing node would infrequently protect peers under normal circumstances. Clarify that we also protect peers that are synced to the same work as our chain tip. --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index d19e11f7b1..52e831ae1c 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -541,7 +541,7 @@ struct CNodeState { * - its connection type is IsBlockOnlyConn() == false * - it gave us a valid connecting header * - we haven't reached MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT yet - * - it has a better chain than we have + * - its chain tip has at least as much work as ours * * CHAIN_SYNC_TIMEOUT: if a peer's best known block has less work than our tip, * set a timeout CHAIN_SYNC_TIMEOUT seconds in the future: