Control mempool persistence using a command line parameter.
Mempool persistence was added in
3f78562df5, and is always on. This commit
introduces a command-line parameter -persistmempool, which defaults to
true. When set to false:
- mempool.dat is not loaded when the node starts.
- mempool.dat is not written when the node stops.
strUsage+=HelpMessageOpt("-maxorphantx=<n>",strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"),DEFAULT_MAX_ORPHAN_TRANSACTIONS));
strUsage+=HelpMessageOpt("-maxorphantx=<n>",strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"),DEFAULT_MAX_ORPHAN_TRANSACTIONS));
strUsage+=HelpMessageOpt("-maxmempool=<n>",strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"),DEFAULT_MAX_MEMPOOL_SIZE));
strUsage+=HelpMessageOpt("-maxmempool=<n>",strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"),DEFAULT_MAX_MEMPOOL_SIZE));
strUsage+=HelpMessageOpt("-mempoolexpiry=<n>",strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"),DEFAULT_MEMPOOL_EXPIRY));
strUsage+=HelpMessageOpt("-mempoolexpiry=<n>",strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"),DEFAULT_MEMPOOL_EXPIRY));
strUsage+=HelpMessageOpt("-persistmempool",strprintf(_("Whether to save the mempool on shutdown and load on restart (default: %u)"),DEFAULT_PERSIST_MEMPOOL));
strUsage+=HelpMessageOpt("-blockreconstructionextratxn=<n>",strprintf(_("Extra transactions to keep in memory for compact block reconstructions (default: %u)"),DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN));
strUsage+=HelpMessageOpt("-blockreconstructionextratxn=<n>",strprintf(_("Extra transactions to keep in memory for compact block reconstructions (default: %u)"),DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN));
strUsage+=HelpMessageOpt("-par=<n>",strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
strUsage+=HelpMessageOpt("-par=<n>",strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),