aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-09-22 11:32:25 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-09-22 11:29:44 +0200
commitfaff17bbde6dcb1482a6210bc48b3192603a446f (patch)
tree8bfc30ad26f2c8f5006b06cb92af0673597a799a
parent51c7d88e6790d857b9920bb8b51422320dde662d (diff)
Fix (inverse) meaning of -persistmempool
-rw-r--r--src/init.cpp2
-rw-r--r--src/validation.cpp2
-rwxr-xr-xtest/functional/mempool_persist.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index ff36ec805c..244c13170a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -218,7 +218,7 @@ void Shutdown(NodeContext& node)
node.banman.reset();
node.addrman.reset();
- if (node.mempool && node.mempool->IsLoaded() && node.args->GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
+ if (node.mempool && node.mempool->IsLoaded() && node.args->GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
DumpMempool(*node.mempool);
}
diff --git a/src/validation.cpp b/src/validation.cpp
index cc87f98913..ed336a177f 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3703,7 +3703,7 @@ bool BlockManager::LoadBlockIndexDB(std::set<CBlockIndex*, CBlockIndexWorkCompar
void CChainState::LoadMempool(const ArgsManager& args)
{
if (!m_mempool) return;
- if (args.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
+ if (args.GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
::LoadMempool(*m_mempool, *this);
}
m_mempool->SetIsLoaded(!ShutdownRequested());
diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py
index 56f7cbe6a5..c073a0e43c 100755
--- a/test/functional/mempool_persist.py
+++ b/test/functional/mempool_persist.py
@@ -141,7 +141,7 @@ class MempoolPersistTest(BitcoinTestFramework):
self.log.debug("Stop nodes, make node1 use mempool.dat from node0. Verify it has 6 transactions")
os.rename(mempooldat0, mempooldat1)
self.stop_nodes()
- self.start_node(1, extra_args=[])
+ self.start_node(1, extra_args=["-persistmempool"])
assert self.nodes[1].getmempoolinfo()["loaded"]
assert_equal(len(self.nodes[1].getrawmempool()), 6)