mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 0655e9dd92 into merged_master (Bitcoin PR bitcoin/bitcoin#27071)
This commit is contained in:
commit
b843409fbf
13 changed files with 162 additions and 133 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue