aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 4dfa7a452d..992ce8ebdc 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -130,6 +130,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
//
std::atomic<bool> fRequestShutdown(false);
+std::atomic<bool> fDumpMempoolLater(false);
void StartShutdown()
{
@@ -211,7 +212,8 @@ void Shutdown()
StopTorControl();
UnregisterNodeSignals(GetNodeSignals());
- DumpMempool();
+ if (fDumpMempoolLater)
+ DumpMempool();
if (fFeeEstimatesInitialized)
{
@@ -669,6 +671,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
}
} // End scope of CImportingNow
LoadMempool();
+ fDumpMempoolLater = !fRequestShutdown;
}
/** Sanity checks