aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-08-10 14:48:54 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-09-02 17:18:21 -0700
commitdff16b184b1428a068d144e5e4dde7595b4729c0 (patch)
treed177683017907e7edc7183c31131f0c7bb030c9c /src/net.cpp
parenta6ab1e81f964df131cfa0e11e07bedb3283b823f (diff)
downloadbitcoin-dff16b184b1428a068d144e5e4dde7595b4729c0.tar.xz
[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.cpp3
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);
}