[#wallet-CWallet-SubmitTxMemoryPoolAndRelay]
= xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::SubmitTxMemoryPoolAndRelay
:relfileprefix: ../../
:mrdocs:

Pass this transaction to node for optional mempool insertion and relay to peers&period;

== Synopsis

Declared in `&lt;wallet&sol;wallet&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f94fde05758), requires&lowbar;capability(0x7f95061a8498), requires&lowbar;capability(0x7f94f2b78fa8), requires&lowbar;capability(0x7f94f0cf7c38), requires&lowbar;capability(0x7f94fee3a628)&rsqb;&rsqb;
bool
SubmitTxMemoryPoolAndRelay(
    xref:wallet/CWalletTx.adoc[CWalletTx]& wtx,
    std::string& err&lowbar;string,
    xref:node/TxBroadcast.adoc[node::TxBroadcast] broadcast&lowbar;method) const;
----

== Return Value

true if the transaction was accepted for broadcast&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *wtx*
| The wallet transaction to submit&period;
| *err&lowbar;string*
| Set to an error message on failure&period;
| *broadcast&lowbar;method*
| How the transaction should be broadcast&period;
|===


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