[#cluster_linearize-DepGraph-AddTransaction]
= xref:cluster_linearize.adoc[cluster&lowbar;linearize]::xref:cluster_linearize/DepGraph.adoc[DepGraph]::AddTransaction
:relfileprefix: ../../
:mrdocs:

Add a new unconnected transaction to this transaction graph (in the first available position), and return its DepGraphIndex&period;

== Synopsis

Declared in `&lt;cluster&lowbar;linearize&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:cluster_linearize/DepGraphIndex.adoc[DepGraphIndex]
AddTransaction(xref:FeeFrac.adoc[FeeFrac] const& feefrac) noexcept;
----

== Description

Complexity&colon; O(1) (amortized, due to resizing of backing vector)&period;

== Return Value

The position assigned to the new transaction&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *feefrac*
| The fee and size of the transaction to add&period;
|===


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