|
|
|
@ -729,7 +729,7 @@ public:
|
|
|
|
|
|
|
|
|
|
// flood relay
|
|
|
|
|
std::vector<CAddress> vAddrToSend;
|
|
|
|
|
CRollingBloomFilter addrKnown;
|
|
|
|
|
std::unique_ptr<CRollingBloomFilter> m_addr_known;
|
|
|
|
|
bool fGetAddr{false};
|
|
|
|
|
int64_t nNextAddrSend GUARDED_BY(cs_sendProcessing){0};
|
|
|
|
|
int64_t nNextLocalAddrSend GUARDED_BY(cs_sendProcessing){0};
|
|
|
|
@ -884,7 +884,7 @@ public:
|
|
|
|
|
|
|
|
|
|
void AddAddressKnown(const CAddress& _addr)
|
|
|
|
|
{
|
|
|
|
|
addrKnown.insert(_addr.GetKey());
|
|
|
|
|
m_addr_known->insert(_addr.GetKey());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PushAddress(const CAddress& _addr, FastRandomContext &insecure_rand)
|
|
|
|
@ -892,7 +892,7 @@ public:
|
|
|
|
|
// Known checking here is only to save space from duplicates.
|
|
|
|
|
// SendMessages will filter it again for knowns that were added
|
|
|
|
|
// after addresses were pushed.
|
|
|
|
|
if (_addr.IsValid() && !addrKnown.contains(_addr.GetKey())) {
|
|
|
|
|
if (_addr.IsValid() && !m_addr_known->contains(_addr.GetKey())) {
|
|
|
|
|
if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) {
|
|
|
|
|
vAddrToSend[insecure_rand.randrange(vAddrToSend.size())] = _addr;
|
|
|
|
|
} else {
|
|
|
|
|