[#DisconnectedBlockTransactions-AddTransactionsFromBlock]
= xref:DisconnectedBlockTransactions.adoc[DisconnectedBlockTransactions]::AddTransactionsFromBlock
:relfileprefix: ../
:mrdocs:

Add transactions from the block, iterating through vtx in reverse order&period; Callers should call this function for blocks in descending order by block height&period; 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&lowbar;by&lowbar;txid&period;

== Synopsis

Declared in `&lt;kernel&sol;disconnected&lowbar;transactions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
std::vector&lt;CTransactionRef&gt;
AddTransactionsFromBlock(std::vector&lt;CTransactionRef&gt; const& vtx);
----

== Return Value

vector of transactions that were evicted for size&hyphen;limiting&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *vtx*
| Transactions of the disconnected block, in vtx order&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
