node::DumpMempool

Dump the mempool to a file.

Synopsis

Declared in <node/mempool_persist.h>

bool
DumpMempool(
    CTxMemPool const& pool,
    fs::path const& dump_path,
    fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen,
    bool skip_file_commit = false);

Return Value

True on success, false if the dump could not be written.

Parameters

NameDescription
poolThe mempool whose contents are written out.
dump_pathDestination path for the serialized mempool.
mockable_fopen_functionFile-open function, overridable for testing.
skip_file_commitIf true, skip the fsync/commit step (used in tests).