| 1012 | } |
| 1013 | |
| 1014 | int CTxMemPool::Expire(int64_t time) { |
| 1015 | LOCK(cs); |
| 1016 | indexed_transaction_set::index<entry_time>::type::iterator it = mapTx.get<entry_time>().begin(); |
| 1017 | setEntries toremove; |
| 1018 | while (it != mapTx.get<entry_time>().end() && it->GetTime() < time) { |
| 1019 | toremove.insert(mapTx.project<0>(it)); |
| 1020 | it++; |
| 1021 | } |
| 1022 | setEntries stage; |
| 1023 | for (txiter removeit : toremove) { |
| 1024 | CalculateDescendants(removeit, stage); |
| 1025 | } |
| 1026 | RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY); |
| 1027 | return stage.size(); |
| 1028 | } |
| 1029 | |
| 1030 | bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate) |
| 1031 | { |