[#TxGraph-AddTransaction] = xref:TxGraph.adoc[TxGraph]::AddTransaction :relfileprefix: ../ :mrdocs: Initialize arg (which must be an empty Ref) to refer to a new transaction in this graph with the specified feerate. == Synopsis Declared in `<txgraph.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual void AddTransaction( xref:TxGraph/Ref.adoc[Ref]& arg, xref:FeePerWeight.adoc[FeePerWeight] const& feerate) noexcept = 0; ---- == Description If a staging graph exists, the new transaction is only created there. feerate.size must be strictly positive. In all further calls, only Refs passed to AddTransaction() are allowed to be passed to this TxGraph object (or empty Ref objects). Ref objects may outlive the TxGraph they were added to. == Parameters [cols="1,4"] |=== | Name| Description | *arg* | Empty Ref that will be bound to the newly created transaction. | *feerate* | Fee and size of the new transaction; its size must be strictly positive. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#