Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 1,187 Lines • ▼ Show 20 Lines | int CTxMemPool::Expire(std::chrono::seconds time) { | ||||
} | } | ||||
RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY); | RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY); | ||||
return stage.size(); | return stage.size(); | ||||
} | } | ||||
void CTxMemPool::LimitSize(CCoinsViewCache &coins_cache, size_t limit, | void CTxMemPool::LimitSize(CCoinsViewCache &coins_cache, size_t limit, | ||||
std::chrono::seconds age) { | std::chrono::seconds age) { | ||||
AssertLockHeld(::cs_main); | |||||
AssertLockHeld(cs); | |||||
int expired = Expire(GetTime<std::chrono::seconds>() - age); | int expired = Expire(GetTime<std::chrono::seconds>() - age); | ||||
if (expired != 0) { | if (expired != 0) { | ||||
LogPrint(BCLog::MEMPOOL, | LogPrint(BCLog::MEMPOOL, | ||||
"Expired %i transactions from the memory pool\n", expired); | "Expired %i transactions from the memory pool\n", expired); | ||||
} | } | ||||
std::vector<COutPoint> vNoSpendsRemaining; | std::vector<COutPoint> vNoSpendsRemaining; | ||||
TrimToSize(limit, &vNoSpendsRemaining); | TrimToSize(limit, &vNoSpendsRemaining); | ||||
▲ Show 20 Lines • Show All 395 Lines • Show Last 20 Lines |