MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / TrimToSize

Method TrimToSize

src/txmempool.cpp:937–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937void CTxMemPool::TrimToSize(size_t sizelimit) {
938 LOCK(cs);
939
940 while (!mapTx.empty() && DynamicMemoryUsage() > sizelimit) {
941 indexed_transaction_set::nth_index<3>::type::iterator it = mapTx.get<3>().end();
942 setEntries stage;
943 it--;
944 CalculateDescendants(mapTx.project<0>(it), stage);
945 RemoveStaged(stage, false);
946 }
947}

Callers 3

AcceptToMemoryPoolFunction · 0.80
ActivateBestChainStepFunction · 0.80
InvalidateBlockFunction · 0.80

Calls 2

emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected