[#ChainstateManager-ProcessTransaction]
= xref:ChainstateManager.adoc[ChainstateManager]::ProcessTransaction
:relfileprefix: ../
:mrdocs:

Try to add a transaction to the memory pool&period;

== Synopsis

Declared in `&lt;validation&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, requires&lowbar;capability(0x7f2e1bc17b68), requires&lowbar;capability(0x7f2e146b5eb8), requires&lowbar;capability(0x7f2e298fb288), requires&lowbar;capability(0x7f2e360b89e8)&rsqb;&rsqb;
xref:MempoolAcceptResult.adoc[MempoolAcceptResult]
ProcessTransaction(
    xref:CTransactionRef.adoc[CTransactionRef] const& tx,
    bool test&lowbar;accept = false);
----

== Return Value

a MempoolAcceptResult indicating whether the transaction was accepted or rejected&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 submit for mempool acceptance&period;
| *test&lowbar;accept* [in]
| When true, run validation checks but don&apos;t submit to mempool&period;
|===


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