aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-03-12 12:50:22 +0800
committerfanquake <fanquake@gmail.com>2021-03-12 13:11:10 +0800
commita13a8cd8e317ea0c6601d556cc0daa2b8a02001f (patch)
treed1942176a2363c5167d71d823fb0c982b12df0c3 /src/net_processing.cpp
parentb972913c330a46811e26221490d3ee042529dfb9 (diff)
parentebde946a527e50630df180c6565ea5bf8d2ab5aa (diff)
downloadbitcoin-a13a8cd8e317ea0c6601d556cc0daa2b8a02001f.tar.xz
Merge #21394: [doc] Improve comment about protected peers
ebde946a527e50630df180c6565ea5bf8d2ab5aa [doc] Improve comment about protected peers (Amiti Uttarwar) Pull request description: 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. [Relevant check here](https://github.com/bitcoin/bitcoin/blob/ee0dc02c6f93de2a366bbff490eb4d37bca6a24f/src/net_processing.cpp#L1997). ACKs for top commit: Empact: ACK https://github.com/bitcoin/bitcoin/pull/21394/commits/ebde946a527e50630df180c6565ea5bf8d2ab5aa jnewbery: ACK ebde946a527e50630df180c6565ea5bf8d2ab5aa Tree-SHA512: 3692f4098e95f935d801e0ee6bbd3a7c9480e66ca070a7c68ba79c4fc2e62377f5d37080c7b6a7d15ab617aaf4d3df9b26abc4f1b090d572ba46fdd092a6a64a
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 01b55d8961..c569acd3cb 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -557,7 +557,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: