33 std::vector<CTransactionRef> evicted;
36 evicted.emplace_back(
queuedTx.front());
52 for (
auto block_it = vtx.rbegin(); block_it != vtx.rend(); ++block_it) {
54 auto [
_, inserted] =
iters_by_txid.emplace((*block_it)->GetHash(), it);
67 for (
const auto& tx : vtx) {
70 auto list_iter = iter->second;
87 std::list<CTransactionRef>
ret = std::move(
queuedTx);
std::list< CTransactionRef > take()
Clear all data structures and return the list of transactions.
~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 size_t RecursiveDynamicUsage(const CScript &script)
static size_t DynamicUsage(const int8_t &v)
Dynamic memory usage for built-in types is zero.
bilingual_str _(ConstevalStringLiteral str)
Translation function.