mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
added asserts to check m_addr_known when it's used
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user