aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorUser <naumenko.gs@gmail.com>2019-10-25 16:28:14 -0400
committerUser <naumenko.gs@gmail.com>2019-10-25 16:28:14 -0400
commita552e8477c5bcd22a5457f4f73a2fd6db8acd2c2 (patch)
treecf5979d0c6e4f63086608a664d646f364cfd2736 /src/net.h
parent090b75c14be6b9ba2efe38a17d141c6e6af575cb (diff)
added asserts to check m_addr_known when it's used
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 2 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;