This commit is contained in:
jl777
2017-03-24 22:35:34 +02:00
parent 14aa6cc0e2
commit 1691b50b8d

View File

@@ -326,15 +326,16 @@ void FinalizeNode(NodeId nodeid) {
mapNodeState.erase(nodeid); mapNodeState.erase(nodeid);
} }
void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age) { void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age)
int expired = pool.Expire(GetTime() - age); {
/* int expired = pool.Expire(GetTime() - age);
if (expired != 0) if (expired != 0)
LogPrint("mempool", "Expired %i transactions from the memory pool\n", expired); LogPrint("mempool", "Expired %i transactions from the memory pool\n", expired);
std::vector<uint256> vNoSpendsRemaining; std::vector<uint256> vNoSpendsRemaining;
pool.TrimToSize(limit, &vNoSpendsRemaining); pool.TrimToSize(limit, &vNoSpendsRemaining);
BOOST_FOREACH(const uint256& removed, vNoSpendsRemaining) BOOST_FOREACH(const uint256& removed, vNoSpendsRemaining)
pcoinsTip->Uncache(removed); pcoinsTip->Uncache(removed);*/
} }
// Requires cs_main. // Requires cs_main.