DisconnectedBlockTransactions::AddTransactionsFromBlock

Add transactions from the block, iterating through vtx in reverse order. Callers should call this function for blocks in descending order by block height. We assume that callers never pass multiple transactions with the same txid, otherwise things can go very wrong in removeForBlock due to queuedTx containing an item without a corresponding entry in iters_by_txid.

Synopsis

Declared in <kernel/disconnected_transactions.h>

[[nodiscard]]
std::vector<CTransactionRef>
AddTransactionsFromBlock(std::vector<CTransactionRef> const& vtx);

Return Value

vector of transactions that were evicted for size-limiting.

NOTE

The return value should not be discarded.

Parameters

NameDescription
vtxTransactions of the disconnected block, in vtx order.