[#ProcessNewPackage]
= ProcessNewPackage
:mrdocs:

Validate (and maybe submit) a package to the mempool&period; See doc&sol;policy&sol;packages&period;md for full details on package validation rules&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1b92a0c8), requires&lowbar;capability(0x7f2e275a32a8), requires&lowbar;capability(0x7f2e369646a8), requires&lowbar;capability(0x7f2e354508f8)&rsqb;&rsqb;
xref:PackageMempoolAcceptResult.adoc[PackageMempoolAcceptResult]
ProcessNewPackage(
    xref:Chainstate.adoc[Chainstate]& active&lowbar;chainstate,
    xref:CTxMemPool.adoc[CTxMemPool]& pool,
    xref:Package.adoc[Package] const& txns,
    bool test&lowbar;accept,
    std::optional&lt;CFeeRate&gt; const& client&lowbar;maxfeerate);
----

== Return Value

a PackageMempoolAcceptResult which includes a MempoolAcceptResult for each transaction&period; If a transaction fails, validation will exit early and some results may be missing&period; It is also possible for the package to be partially submitted&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *active&lowbar;chainstate* [in]
| Reference to the active chainstate&period;
| *pool* [in]
| The mempool the package is validated against&period;
| *txns* [in]
| The transactions that make up the package&period;
| *test&lowbar;accept* [in]
| When true, run validation checks but don&apos;t submit to mempool&period;
| *client&lowbar;maxfeerate* [in]
| If exceeded by an individual transaction, rest of (sub)package evaluation is aborted&period; Only for sanity checks against local submission of transactions&period;
|===


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