File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
130130//
131131
132132std::atomic<bool > fRequestShutdown (false );
133+ std::atomic<bool > fDumpMempoolLater (false );
133134
134135void StartShutdown ()
135136{
@@ -209,7 +210,8 @@ void Shutdown()
209210
210211 StopTorControl ();
211212 UnregisterNodeSignals (GetNodeSignals ());
212- DumpMempool ();
213+ if (fDumpMempoolLater )
214+ DumpMempool ();
213215
214216 if (fFeeEstimatesInitialized )
215217 {
@@ -667,6 +669,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
667669 }
668670 } // End scope of CImportingNow
669671 LoadMempool ();
672+ fDumpMempoolLater = !fRequestShutdown ;
670673}
671674
672675/* * Sanity checks
Original file line number Diff line number Diff line change @@ -4076,6 +4076,8 @@ bool LoadMempool(void)
40764076 } else {
40774077 ++skipped;
40784078 }
4079+ if (ShutdownRequested ())
4080+ return false ;
40794081 }
40804082 std::map<uint256, CAmount> mapDeltas;
40814083 file >> mapDeltas;
You can’t perform that action at this time.
0 commit comments