Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 1,327 Lines • ▼ Show 20 Lines | PeerLogicValidation::PeerLogicValidation(CConnman *connmanIn, BanMan *banman, | ||||
static_assert( | static_assert( | ||||
EXTRA_PEER_CHECK_INTERVAL < STALE_CHECK_INTERVAL, | EXTRA_PEER_CHECK_INTERVAL < STALE_CHECK_INTERVAL, | ||||
"peer eviction timer should be less than stale tip check timer"); | "peer eviction timer should be less than stale tip check timer"); | ||||
scheduler.scheduleEvery( | scheduler.scheduleEvery( | ||||
[this, &consensusParams]() { | [this, &consensusParams]() { | ||||
this->CheckForStaleTipAndEvictPeers(consensusParams); | this->CheckForStaleTipAndEvictPeers(consensusParams); | ||||
return true; | return true; | ||||
}, | }, | ||||
EXTRA_PEER_CHECK_INTERVAL * 1000); | std::chrono::seconds{EXTRA_PEER_CHECK_INTERVAL}); | ||||
} | } | ||||
/** | /** | ||||
* Evict orphan txn pool entries (EraseOrphanTx) based on a newly connected | * Evict orphan txn pool entries (EraseOrphanTx) based on a newly connected | ||||
* block. Also save the time of the last tip update. | * block. Also save the time of the last tip update. | ||||
*/ | */ | ||||
void PeerLogicValidation::BlockConnected( | void PeerLogicValidation::BlockConnected( | ||||
const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex, | const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex, | ||||
▲ Show 20 Lines • Show All 3,742 Lines • Show Last 20 Lines |