Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 923 Lines • ▼ Show 20 Lines | public: | ||||
// Remove an entry by insertion_order index, and update memory usage. | // Remove an entry by insertion_order index, and update memory usage. | ||||
void removeEntry(indexed_disconnected_transactions::index< | void removeEntry(indexed_disconnected_transactions::index< | ||||
insertion_order>::type::iterator entry) { | insertion_order>::type::iterator entry) { | ||||
cachedInnerUsage -= RecursiveDynamicUsage(*entry); | cachedInnerUsage -= RecursiveDynamicUsage(*entry); | ||||
queuedTx.get<insertion_order>().erase(entry); | queuedTx.get<insertion_order>().erase(entry); | ||||
} | } | ||||
bool isEmpty() { return queuedTx.empty(); } | |||||
void clear() { | void clear() { | ||||
cachedInnerUsage = 0; | cachedInnerUsage = 0; | ||||
queuedTx.clear(); | queuedTx.clear(); | ||||
} | } | ||||
/** | /** | ||||
* Make mempool consistent after a reorg, by re-adding or recursively | * Make mempool consistent after a reorg, by re-adding or recursively | ||||
* erasing disconnected block transactions from the mempool, and also | * erasing disconnected block transactions from the mempool, and also | ||||
Show All 14 Lines |