[#CTxMemPool-removeForReorg]
= xref:CTxMemPool.adoc[CTxMemPool]::removeForReorg
:relfileprefix: ../
:mrdocs:

After reorg, filter the entries that would no longer be valid in the next block, and update the entries&apos; cached LockPoints if needed&period; The mempool does not have any knowledge of consensus rules&period; It just applies the callable function and removes the ones for which it returns true&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f95135d1e48, 0x7f95135d1e78), requires&lowbar;capability(0x7f9501b11228, 0x7f9501b11258), requires&lowbar;capability(0x7f950ec77418, 0x7f950ec77448), requires&lowbar;capability(0x7f9525ea7168, 0x7f9525ea7198), requires&lowbar;capability(0x7f95150968a8, 0x7f95150968d8), requires&lowbar;capability(0x7f950826ab48, 0x7f950826ab78), requires&lowbar;capability(0x7f94f856e258, 0x7f94f856e288), requires&lowbar;capability(0x7f9513c58448, 0x7f9513c58478)&rsqb;&rsqb;
void
removeForReorg(
    xref:CChain.adoc[CChain]& chain,
    std::function&lt;bool(xref:CTxMemPool/txiter.adoc[txiter])&gt; filter&lowbar;final&lowbar;and&lowbar;mature);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *chain* [in]
| The chain to validate entries against after the reorg&period;
| *filter&lowbar;final&lowbar;and&lowbar;mature* [in]
| Predicate that checks the relevant validation rules and updates an entry&apos;s LockPoints&period;
|===


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