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";
130
130
//
131
131
132
132
std::atomic<bool > fRequestShutdown (false );
133
+ std::atomic<bool > fDumpMempoolLater (false );
133
134
134
135
void StartShutdown ()
135
136
{
@@ -209,7 +210,8 @@ void Shutdown()
209
210
210
211
StopTorControl ();
211
212
UnregisterNodeSignals (GetNodeSignals ());
212
- DumpMempool ();
213
+ if (fDumpMempoolLater )
214
+ DumpMempool ();
213
215
214
216
if (fFeeEstimatesInitialized )
215
217
{
@@ -667,6 +669,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
667
669
}
668
670
} // End scope of CImportingNow
669
671
LoadMempool ();
672
+ fDumpMempoolLater = !fRequestShutdown ;
670
673
}
671
674
672
675
/* * Sanity checks
Original file line number Diff line number Diff line change @@ -4076,6 +4076,8 @@ bool LoadMempool(void)
4076
4076
} else {
4077
4077
++skipped;
4078
4078
}
4079
+ if (ShutdownRequested ())
4080
+ return false ;
4079
4081
}
4080
4082
std::map<uint256, CAmount> mapDeltas;
4081
4083
file >> mapDeltas;
You can’t perform that action at this time.
0 commit comments