MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetupAddressRelay

Method SetupAddressRelay

src/net_processing.cpp:4632–4646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4630}
4631
4632bool PeerManagerImpl::SetupAddressRelay(const CNode& node, Peer& peer)
4633{
4634 // We don't participate in addr relay with outbound block-relay-only
4635 // connections to prevent providing adversaries with the additional
4636 // information of addr traffic to infer the link.
4637 if (node.IsBlockOnlyConn()) return false;
4638
4639 if (!peer.m_addr_relay_enabled.exchange(true)) {
4640 // First addr message we have received from the peer, initialize
4641 // m_addr_known
4642 peer.m_addr_known = std::make_unique<CRollingBloomFilter>(5000, 0.001);
4643 }
4644
4645 return true;
4646}
4647
4648bool PeerManagerImpl::SendMessages(CNode* pto)
4649{

Callers

nothing calls this directly

Calls 1

IsBlockOnlyConnMethod · 0.80

Tested by

no test coverage detected