aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-14 18:25:20 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-14 18:15:51 +0100
commitfa86217e97234aac6f815a6768afc1b87b8b2ae8 (patch)
tree0508683608dafe3499dfe872826b026ecf17a016 /src
parentb103fdcb3bf41a063752605311c80a11ef666596 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp21
-rw-r--r--src/net.h3
2 files changed, 12 insertions, 12 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 7cb91f1388..261d0c2f57 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2963,18 +2963,15 @@ unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
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)
: nTimeConnected(GetSystemTimeInSeconds()),
- addr(addrIn),
- addrBind(addrBindIn),
- nKeyedNetGroup(nKeyedNetGroupIn),
- // Don't relay addr messages to peers that we connect to as block-relay-only
- // peers (to prevent adversaries from inferring these links from addr
- // traffic).
- id(idIn),
- nLocalHostNonce(nLocalHostNonceIn),
- m_conn_type(conn_type_in),
- nLocalServices(nLocalServicesIn),
- nMyStartingHeight(nMyStartingHeightIn),
- m_inbound_onion(inbound_onion)
+ addr(addrIn),
+ addrBind(addrBindIn),
+ nKeyedNetGroup(nKeyedNetGroupIn),
+ id(idIn),
+ nLocalHostNonce(nLocalHostNonceIn),
+ m_conn_type(conn_type_in),
+ nLocalServices(nLocalServicesIn),
+ nMyStartingHeight(nMyStartingHeightIn),
+ m_inbound_onion(inbound_onion)
{
hSocket = hSocketIn;
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
diff --git a/src/net.h b/src/net.h
index 41f7fa93ff..1f3bf2b48b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -964,6 +964,9 @@ public:
/* Whether we send addr messages over this connection */
bool RelayAddrsWithConn() const
{
+ // Don't relay addr messages to peers that we connect to as block-relay-only
+ // peers (to prevent adversaries from inferring these links from addr
+ // traffic).
return m_conn_type != ConnectionType::BLOCK_RELAY;
}