MCPcopy Create free account
hub / github.com/ElementsProject/elements / removeForBlock

Method removeForBlock

src/txmempool.h:1038–1051  ·  view source on GitHub ↗

Remove entries based on txid_index, and update memory usage.

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 6

RecursiveDynamicUsageFunction · 0.85
findMethod · 0.80
emptyMethod · 0.45
GetHashMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected