5 #ifndef BITCOIN_KERNEL_DISCONNECTED_TRANSACTIONS_H 6 #define BITCOIN_KERNEL_DISCONNECTED_TRANSACTIONS_H 14 #include <unordered_map> 46 std::unordered_map<Txid, TxList::iterator, SaltedTxidHasher>
iters_by_txid;
76 std::list<CTransactionRef>
take();
78 #endif // BITCOIN_KERNEL_DISCONNECTED_TRANSACTIONS_H
~DisconnectedBlockTransactions()
static const unsigned int MAX_DISCONNECTED_TX_POOL_BYTES
Maximum bytes for transactions to store for processing during reorg.
DisconnectedBlockTransactions(size_t max_mem_usage)
void removeForBlock(const std::vector< CTransactionRef > &vtx)
Remove any entries that are in this block.
std::list< CTransactionRef > queuedTx
std::vector< CTransactionRef > LimitMemoryUsage()
Trim the earliest-added entries until we are within memory bounds.
DisconnectedBlockTransactions.
decltype(queuedTx) TxList
const size_t m_max_mem_usage
std::unordered_map< Txid, TxList::iterator, SaltedTxidHasher > iters_by_txid
size_t DynamicMemoryUsage() const
std::list< CTransactionRef > take()
Clear all data structures and return the list of transactions.
uint64_t cachedInnerUsage
Cached dynamic memory usage for the CTransactionRefs.
std::vector< CTransactionRef > AddTransactionsFromBlock(const std::vector< CTransactionRef > &vtx)
Add transactions from the block, iterating through vtx in reverse order.