aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2018-01-12 21:38:48 +0100
committerJorge Timón <jtimon@jtimon.cc>2018-03-29 06:24:30 +0200
commitcb1e319fe9e198c9c5cf5236fe9af5a3d748b9e8 (patch)
tree8838739229d115b134824dcb04c2494ac87b8379 /src/init.cpp
parent624bee96597c1d59018e58131b8285c0b332700d (diff)
Bugfix: RPC: savemempool: Don't save until LoadMempool() is finished
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index b0ba0cb835..348af4b13b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -116,7 +116,6 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
//
std::atomic<bool> fRequestShutdown(false);
-std::atomic<bool> fDumpMempoolLater(false);
void StartShutdown()
{
@@ -208,7 +207,7 @@ void Shutdown()
threadGroup.interrupt_all();
threadGroup.join_all();
- if (fDumpMempoolLater && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
+ if (g_is_mempool_loaded && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
DumpMempool();
}
@@ -692,8 +691,8 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
} // End scope of CImportingNow
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
LoadMempool();
- fDumpMempoolLater = !fRequestShutdown;
}
+ g_is_mempool_loaded = !fRequestShutdown;
}
/** Sanity checks