| 913 | } |
| 914 | |
| 915 | int CTxMemPool::Expire(int64_t time) { |
| 916 | LOCK(cs); |
| 917 | indexed_transaction_set::index<entry_time>::type::iterator it = mapTx.get<entry_time>().begin(); |
| 918 | setEntries toremove; |
| 919 | while (it != mapTx.get<entry_time>().end() && it->GetTime() < time) { |
| 920 | toremove.insert(mapTx.project<0>(it)); |
| 921 | it++; |
| 922 | } |
| 923 | setEntries stage; |
| 924 | for (txiter removeit : toremove) { |
| 925 | CalculateDescendants(removeit, stage); |
| 926 | } |
| 927 | RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY); |
| 928 | return stage.size(); |
| 929 | } |
| 930 | |
| 931 | void CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate) |
| 932 | { |