| 935 | } |
| 936 | |
| 937 | void 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 | } |
no test coverage detected