Skip to content

Commit fa86217

Browse files
author
MarcoFalke
committed
doc: Move add relay comment in net to correct place
Can be reviewed with --ignore-all-space --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
1 parent b103fdc commit fa86217

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
@@ -2963,18 +2963,15 @@ unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
29632963

29642964
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)
29652965
: nTimeConnected(GetSystemTimeInSeconds()),
2966-
addr(addrIn),
2967-
addrBind(addrBindIn),
2968-
nKeyedNetGroup(nKeyedNetGroupIn),
2969-
// Don't relay addr messages to peers that we connect to as block-relay-only
2970-
// peers (to prevent adversaries from inferring these links from addr
2971-
// traffic).
2972-
id(idIn),
2973-
nLocalHostNonce(nLocalHostNonceIn),
2974-
m_conn_type(conn_type_in),
2975-
nLocalServices(nLocalServicesIn),
2976-
nMyStartingHeight(nMyStartingHeightIn),
2977-
m_inbound_onion(inbound_onion)
2966+
addr(addrIn),
2967+
addrBind(addrBindIn),
2968+
nKeyedNetGroup(nKeyedNetGroupIn),
2969+
id(idIn),
2970+
nLocalHostNonce(nLocalHostNonceIn),
2971+
m_conn_type(conn_type_in),
2972+
nLocalServices(nLocalServicesIn),
2973+
nMyStartingHeight(nMyStartingHeightIn),
2974+
m_inbound_onion(inbound_onion)
29782975
{
29792976
hSocket = hSocketIn;
29802977
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;

src/net.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,9 @@ class CNode
964964
/* Whether we send addr messages over this connection */
965965
bool RelayAddrsWithConn() const
966966
{
967+
// Don't relay addr messages to peers that we connect to as block-relay-only
968+
// peers (to prevent adversaries from inferring these links from addr
969+
// traffic).
967970
return m_conn_type != ConnectionType::BLOCK_RELAY;
968971
}
969972

0 commit comments

Comments
 (0)