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