[#CheckEphemeralSpends]
= CheckEphemeralSpends
:mrdocs:

Called for each transaction(package) if any dust is in the package&period; Checks that each transaction&apos;s parents have their dust spent by the child, where parents are either in the mempool or in the package itself&period; Sets out&lowbar;child&lowbar;state and out&lowbar;child&lowbar;wtxid on failure&period;

== Synopsis

Declared in `&lt;policy&sol;ephemeral&lowbar;policy&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
CheckEphemeralSpends(
    xref:Package.adoc[Package] const& package,
    xref:CFeeRate.adoc[CFeeRate] dust&lowbar;relay&lowbar;rate,
    xref:CTxMemPool.adoc[CTxMemPool] const& tx&lowbar;pool,
    xref:TxValidationState.adoc[TxValidationState]& out&lowbar;child&lowbar;state,
    xref:Wtxid.adoc[Wtxid]& out&lowbar;child&lowbar;wtxid);
----

== Return Value

true if all dust is properly spent&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *package*
| Transactions evaluated together as a package&period;
| *dust&lowbar;relay&lowbar;rate*
| Fee rate used to decide which outputs count as dust&period;
| *tx&lowbar;pool*
| Mempool consulted for parents not present in the package&period;
| *out&lowbar;child&lowbar;state*
| Set with the rejection reason for the offending child on failure&period;
| *out&lowbar;child&lowbar;wtxid*
| Set to the witness txid of the offending child on failure&period;
|===


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