Page MenuHomePhabricator

Merge #11099: [RPC][mempool]: Add savemempool RPC

Authored by jasonbcox on May 6 2019, 23:09.


Group Reviewers
Restricted Project
rABC105a473fc6dd: Merge #11099: [RPC][mempool]: Add savemempool RPC

1aa97ee08 Add savemempool RPC (Lawrence Nahum)
467cbbcbf Add return value to DumpMempool (Lawrence Nahum)

Pull request description:

Adds a simple parameterless rpc command to dump the mempool.


Sometimes there can be a crash for whatever reason (bug, power loss, etc) causing the mempool.dat file to not be saved.

This change allows to script/cron the rpc call to have more regular saves to the file as well as cli/ad-hoc.

This should solve issue

Tree-SHA512: e856ae9777425a4521279c9b58e69285d8e374790bebefd3284cf91931eac0e456f86224f427a087a01bf70440bf6e439fa02c8a34940eb1046ae473e98b6aaa

Backport of Core PR 11099

Test Plan

make check mempool_persist

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.May 6 2019, 23:09
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 6 2019, 23:09
Fabien added a comment.May 7 2019, 07:57

What do you think backporting PR12172 (D2957) and alongside this diff? This will avoid having open issues in the codebase.

Fabien accepted this revision.May 8 2019, 09:59

Discussed in dev meeting, the diff will be landed only when the fixes are ready to land as well.

This revision is now accepted and ready to land.May 8 2019, 09:59
This revision was automatically updated to reflect the committed changes.