diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -986,6 +986,7 @@ void Release() { nRefCount--; } void AddAddressKnown(const CAddress &_addr) { + assert(m_addr_known); m_addr_known->insert(_addr.GetKey()); } @@ -993,6 +994,7 @@ // Known checking here is only to save space from duplicates. // SendMessages will filter it again for knowns that were added // after addresses were pushed. + assert(m_addr_known); if (_addr.IsValid() && !m_addr_known->contains(_addr.GetKey())) { if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) { vAddrToSend[insecure_rand.randrange(vAddrToSend.size())] = diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4356,6 +4356,7 @@ PoissonNextSend(nNow, AVG_ADDRESS_BROADCAST_INTERVAL); std::vector vAddr; vAddr.reserve(pto->vAddrToSend.size()); + assert(pto->m_addr_known); for (const CAddress &addr : pto->vAddrToSend) { if (!pto->m_addr_known->contains(addr.GetKey())) { pto->m_addr_known->insert(addr.GetKey());