Skip to content

Commit a35a346

Browse files
author
MarcoFalke
committed
Merge #20653: doc: Move addr relay comment in net to correct place
fa86217 doc: Move add relay comment in net to correct place (MarcoFalke) Pull request description: The comment was previously attached to `m_addr_known`, but now it is attached to `id`, which is wrong. Fix that by moving the comment to `RelayAddrsWithConn`. ACKs for top commit: practicalswift: cr ACK fa86217: patch looks correct jnewbery: ACK fa86217 theStack: Code review ACK fa86217 🌳 Tree-SHA512: ec3d5f1996aded38947d2a5fd0bb63539e88f83964cd3254984002edfd51abb4dde813c7c81619a8a3a5c55b7e9ae83c8c5be8ad6c84b4593ed3bbf463fe8979
2 parents ec6149c + fa86217 commit a35a346

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/net.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,18 +2947,15 @@ unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
29472947

29482948
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress& addrBindIn, const std::string& addrNameIn, ConnectionType conn_type_in, bool inbound_onion)
29492949
: nTimeConnected(GetSystemTimeInSeconds()),
2950-
addr(addrIn),
2951-
addrBind(addrBindIn),
2952-
nKeyedNetGroup(nKeyedNetGroupIn),
2953-
// Don't relay addr messages to peers that we connect to as block-relay-only
2954-
// peers (to prevent adversaries from inferring these links from addr
2955-
// traffic).
2956-
id(idIn),
2957-
nLocalHostNonce(nLocalHostNonceIn),
2958-
m_conn_type(conn_type_in),
2959-
nLocalServices(nLocalServicesIn),
2960-
nMyStartingHeight(nMyStartingHeightIn),
2961-
m_inbound_onion(inbound_onion)
2950+
addr(addrIn),
2951+
addrBind(addrBindIn),
2952+
nKeyedNetGroup(nKeyedNetGroupIn),
2953+
id(idIn),
2954+
nLocalHostNonce(nLocalHostNonceIn),
2955+
m_conn_type(conn_type_in),
2956+
nLocalServices(nLocalServicesIn),
2957+
nMyStartingHeight(nMyStartingHeightIn),
2958+
m_inbound_onion(inbound_onion)
29622959
{
29632960
hSocket = hSocketIn;
29642961
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;

src/net.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,9 @@ class CNode
954954
/* Whether we send addr messages over this connection */
955955
bool RelayAddrsWithConn() const
956956
{
957+
// Don't relay addr messages to peers that we connect to as block-relay-only
958+
// peers (to prevent adversaries from inferring these links from addr
959+
// traffic).
957960
return m_conn_type != ConnectionType::BLOCK_RELAY;
958961
}
959962

0 commit comments

Comments
 (0)