Merge 0655e9dd92 into merged_master (Bitcoin PR bitcoin/bitcoin#27071)

This commit is contained in:
Byron Hambly 2025-08-07 13:42:28 +02:00
commit b843409fbf
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
13 changed files with 162 additions and 133 deletions

View file

@ -3882,14 +3882,15 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
continue;
}
++num_proc;
bool fReachable = IsReachable(addr);
const bool reachable{g_reachable_nets.Contains(addr)};
if (addr.nTime > current_a_time - 10min && !peer->m_getaddr_sent && vAddr.size() <= 10 && addr.IsRoutable()) {
// Relay to a limited number of other nodes
RelayAddress(pfrom.GetId(), addr, fReachable);
RelayAddress(pfrom.GetId(), addr, reachable);
}
// Do not store addresses outside our network
if (fReachable)
if (reachable) {
vAddrOk.push_back(addr);
}
}
peer->m_addr_processed += num_proc;
peer->m_addr_rate_limited += num_rate_limit;