diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2020-08-10 14:48:54 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2020-09-02 17:18:21 -0700 |
commit | dff16b184b1428a068d144e5e4dde7595b4729c0 (patch) | |
tree | d177683017907e7edc7183c31131f0c7bb030c9c /src/net.cpp | |
parent | a6ab1e81f964df131cfa0e11e07bedb3283b823f (diff) |
[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
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index b013896ca3..0a9a8f7fb4 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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); } |