[#node-DumpMempool]
= xref:node.adoc[node]::DumpMempool
:relfileprefix: ../
:mrdocs:

Dump the mempool to a file&period;

== Synopsis

Declared in `&lt;node&sol;mempool&lowbar;persist&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
DumpMempool(
    xref:CTxMemPool.adoc[CTxMemPool] const& pool,
    xref:fs/path.adoc[fs::path] const& dump&lowbar;path,
    xref:fsbridge/FopenFn.adoc[fsbridge::FopenFn] mockable&lowbar;fopen&lowbar;function = fsbridge&colon;&colon;fopen,
    bool skip&lowbar;file&lowbar;commit = false);
----

== Return Value

True on success, false if the dump could not be written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pool*
| The mempool whose contents are written out&period;
| *dump&lowbar;path*
| Destination path for the serialized mempool&period;
| *mockable&lowbar;fopen&lowbar;function*
| File&hyphen;open function, overridable for testing&period;
| *skip&lowbar;file&lowbar;commit*
| If true, skip the fsync&sol;commit step (used in tests)&period;
|===


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