Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,694 Lines • ▼ Show 20 Lines | void PeerManagerImpl::AvalanchePeriodicNetworking(CScheduler &scheduler) const { | ||||
m_connman.ForEachNode([&](CNode *pnode) { | m_connman.ForEachNode([&](CNode *pnode) { | ||||
// Build a list of the avalanche manual or outbound peers nodeids | // Build a list of the avalanche manual or outbound peers nodeids | ||||
if (isAvalancheOutboundOrManual(pnode)) { | if (isAvalancheOutboundOrManual(pnode)) { | ||||
avanode_outbound_ids.push_back(pnode->GetId()); | avanode_outbound_ids.push_back(pnode->GetId()); | ||||
} | } | ||||
// If a proof radix tree timed out, cleanup | // If a proof radix tree timed out, cleanup | ||||
if (pnode->m_proof_relay && | if (pnode->m_proof_relay && | ||||
!pnode->m_proof_relay->sharedProofs.isNull() && | |||||
now > (pnode->m_proof_relay->lastSharedProofsUpdate.load() + | now > (pnode->m_proof_relay->lastSharedProofsUpdate.load() + | ||||
AVALANCHE_AVAPROOFS_TIMEOUT)) { | AVALANCHE_AVAPROOFS_TIMEOUT)) { | ||||
LogPrint(BCLog::AVALANCHE, | LogPrint(BCLog::AVALANCHE, | ||||
"Cleaning up timed out compact proofs from peer %d\n", | "Cleaning up timed out compact proofs from peer %d\n", | ||||
pnode->GetId()); | pnode->GetId()); | ||||
pnode->m_proof_relay->sharedProofs = {}; | pnode->m_proof_relay->sharedProofs = {}; | ||||
} | } | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 5,407 Lines • Show Last 20 Lines |