aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net.h2
-rw-r--r--src/net_processing.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 4a7f7bc093..95193a09db 100644
--- a/src/net.h
+++ b/src/net.h
@@ -884,6 +884,7 @@ public:
void AddAddressKnown(const CAddress& _addr)
{
+ assert(m_addr_known);
m_addr_known->insert(_addr.GetKey());
}
@@ -892,6 +893,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.
+ 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())] = _addr;
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 188c3d777e..c1743c2e32 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3561,6 +3561,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
pto->nNextAddrSend = PoissonNextSend(nNow, AVG_ADDRESS_BROADCAST_INTERVAL);
std::vector<CAddress> 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()))