File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1784,7 +1784,7 @@ void CConnman::SetTryNewOutboundPeer(bool flag)
1784
1784
1785
1785
// Return the number of peers we have over our outbound connection limit
1786
1786
// Exclude peers that are marked for disconnect, or are going to be
1787
- // disconnected soon (eg one-shots and feelers )
1787
+ // disconnected soon (eg ADDR_FETCH and FEELER )
1788
1788
// Also exclude peers that haven't finished initial connection handshake yet
1789
1789
// (so that we don't decide we're over our desired connection limit, and then
1790
1790
// evict some peer that has finished the handshake)
Original file line number Diff line number Diff line change @@ -143,10 +143,19 @@ enum class ConnectionType {
143
143
MANUAL,
144
144
145
145
/* *
146
- * Feeler connections are short lived connections used to increase the
147
- * number of connectable addresses in our AddrMan. Approximately every
148
- * FEELER_INTERVAL, we attempt to connect to a random address from the new
149
- * table. If successful, we add it to the tried table.
146
+ * Feeler connections are short-lived connections made to check that a node
147
+ * is alive. They can be useful for:
148
+ * - test-before-evict: if one of the peers is considered for eviction from
149
+ * our AddrMan because another peer is mapped to the same slot in the tried table,
150
+ * evict only if this longer-known peer is offline.
151
+ * - move node addresses from New to Tried table, so that we have more
152
+ * connectable addresses in our AddrMan.
153
+ * Note that in the literature ("Eclipse Attacks on Bitcoin’s Peer-to-Peer Network")
154
+ * only the latter feature is referred to as "feeler connections",
155
+ * although in our codebase feeler connections encompass test-before-evict as well.
156
+ * We make these connections approximately every FEELER_INTERVAL:
157
+ * first we resolve previously found collisions if they exist (test-before-evict),
158
+ * otherwise connect to a node from the new table.
150
159
*/
151
160
FEELER,
152
161
You can’t perform that action at this time.
0 commit comments