[#AcceptToMemoryPool]
= AcceptToMemoryPool
:mrdocs:

Try to add a transaction to the mempool&period; This is an internal function and is exposed only for testing&period; Client code should use ChainstateManager&colon;&colon;ProcessTransaction()

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1b929958), requires&lowbar;capability(0x7f2e275a2b38), requires&lowbar;capability(0x7f2e36963f38), requires&lowbar;capability(0x7f2e35450188)&rsqb;&rsqb;
xref:MempoolAcceptResult.adoc[MempoolAcceptResult]
AcceptToMemoryPool(
    xref:Chainstate.adoc[Chainstate]& active&lowbar;chainstate,
    xref:CTransactionRef.adoc[CTransactionRef] const& tx,
    int64&lowbar;t accept&lowbar;time,
    bool bypass&lowbar;limits,
    bool test&lowbar;accept);
----

== Return Value

a MempoolAcceptResult indicating whether the transaction was accepted&sol;rejected with reason&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *active&lowbar;chainstate* [in]
| Reference to the active chainstate&period;
| *tx* [in]
| The transaction to submit for mempool acceptance&period;
| *accept&lowbar;time* [in]
| The timestamp for adding the transaction to the mempool&period; It is also used to determine when the entry expires&period;
| *bypass&lowbar;limits* [in]
| When true, don&apos;t enforce mempool fee and capacity limits, and set entry&lowbar;sequence to zero&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]#
