| 1157 | } |
| 1158 | |
| 1159 | int CTxMemPool::Expire(std::chrono::seconds time) |
| 1160 | { |
| 1161 | AssertLockHeld(cs); |
| 1162 | indexed_transaction_set::index<entry_time>::type::iterator it = mapTx.get<entry_time>().begin(); |
| 1163 | setEntries toremove; |
| 1164 | while (it != mapTx.get<entry_time>().end() && it->GetTime() < time) { |
| 1165 | toremove.insert(mapTx.project<0>(it)); |
| 1166 | it++; |
| 1167 | } |
| 1168 | setEntries stage; |
| 1169 | for (txiter removeit : toremove) { |
| 1170 | CalculateDescendants(removeit, stage); |
| 1171 | } |
| 1172 | RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY); |
| 1173 | return stage.size(); |
| 1174 | } |
| 1175 | |
| 1176 | void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, bool validFeeEstimate) |
| 1177 | { |