[#PrivateBroadcast-Add]
= xref:PrivateBroadcast.adoc[PrivateBroadcast]::Add
:relfileprefix: ../
:mrdocs:

Add a transaction to the storage, or reset an exhausted transaction so it can be broadcast again&period;

== Synopsis

Declared in `&lt;private&lowbar;broadcast&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, requires&lowbar;capability(0x7f2e37684358), requires&lowbar;capability(0x7f2e219d18d8), requires&lowbar;capability(0x7f2e1ac64b08)&rsqb;&rsqb;
xref:PrivateBroadcast/AddResult.adoc[AddResult]
Add(xref:CTransactionRef.adoc[CTransactionRef] const& tx);
----

== Return Value

Whether the transaction was newly added or reset, was already present with send attempts remaining, or was rejected because the queue is full (see AddResult)&period;

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

[cols="1,4"]
|===
| Name| Description
| *tx* [in]
| The transaction to add&period;
|===


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