Remove entries based on txid_index, and update memory usage.
| 1036 | |
| 1037 | // Remove entries based on txid_index, and update memory usage. |
| 1038 | void removeForBlock(const std::vector<CTransactionRef>& vtx) |
| 1039 | { |
| 1040 | // Short-circuit in the common case of a block being added to the tip |
| 1041 | if (queuedTx.empty()) { |
| 1042 | return; |
| 1043 | } |
| 1044 | for (auto const &tx : vtx) { |
| 1045 | auto it = queuedTx.find(tx->GetHash()); |
| 1046 | if (it != queuedTx.end()) { |
| 1047 | cachedInnerUsage -= RecursiveDynamicUsage(*it); |
| 1048 | queuedTx.erase(it); |
| 1049 | } |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | // Remove an entry by insertion_order index, and update memory usage. |
| 1054 | void removeEntry(indexed_disconnected_transactions::index<insertion_order>::type::iterator entry) |