mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
[refactor] Restructure logic to check for addr relay.
We previously identified if we relay addresses to the connection by checking for the existence of the m_addr_known data structure. With this commit, we answer this question based on the connection type. IsAddrRelayPeer() checked for the existence of the m_addr_known
This commit is contained in:
@@ -2784,6 +2784,9 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||
hashContinue = uint256();
|
||||
if (conn_type_in != ConnectionType::BLOCK_RELAY) {
|
||||
m_tx_relay = MakeUnique<TxRelay>();
|
||||
}
|
||||
|
||||
if (RelayAddrsWithConn()) {
|
||||
m_addr_known = MakeUnique<CRollingBloomFilter>(5000, 0.001);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user