aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2019-04-05 13:35:15 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2019-09-04 14:58:36 -0400
commit430f489027f15c1e4948ea4378954df24e3fee88 (patch)
treee0e8a8e4c9c1fc30957473e8072042b5e92c9160 /src/net.h
parent3a5e885306ea954d7eccdc11502e91a51dab8ec6 (diff)
Don't relay addr messages to block-relay-only peers
We don't want relay of addr messages to leak information about these network links.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 20b7932037..605d7a8252 100644
--- a/src/net.h
+++ b/src/net.h
@@ -712,6 +712,9 @@ public:
int64_t nNextAddrSend GUARDED_BY(cs_sendProcessing){0};
int64_t nNextLocalAddrSend GUARDED_BY(cs_sendProcessing){0};
+ const bool m_addr_relay_peer;
+ bool IsAddrRelayPeer() const { return m_addr_relay_peer; }
+
// List of block ids we still have announce.
// There is no final sorting before sending, as they are always sent immediately
// and in the order requested.
@@ -748,6 +751,7 @@ public:
// m_tx_relay == nullptr if we're not relaying transactions with this peer
std::unique_ptr<TxRelay> m_tx_relay;
+
// Used for headers announcements - unfiltered blocks to relay
std::vector<uint256> vBlockHashesToAnnounce GUARDED_BY(cs_inventory);