mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge #20653: doc: Move addr relay comment in net to correct place
fa86217e97
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 ACKfa86217e97
: patch looks correct jnewbery: ACKfa86217e97
theStack: Code review ACKfa86217e97
🌳 Tree-SHA512: ec3d5f1996aded38947d2a5fd0bb63539e88f83964cd3254984002edfd51abb4dde813c7c81619a8a3a5c55b7e9ae83c8c5be8ad6c84b4593ed3bbf463fe8979
This commit is contained in:
commit
a35a3466ef
2 changed files with 12 additions and 12 deletions
21
src/net.cpp
21
src/net.cpp
|
@ -2947,18 +2947,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;
|
||||
|
|
|
@ -954,6 +954,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue