Merge branch '0.19_2' into 0.19
There was an accidental direct push to the 0.19 branch, add a merge commit with signature and treehash to make verify-commits happy again. Tree-SHA512: 47e9f37ec2b8d8402cf3d05f71713ef7e71843dd8360d68e21f99dcd285fc397171907102aad8e6e8525097f589f3c419f1f0c18ff66c7e45a553af8625a0842
This commit is contained in:
commit
4cf7350422
1 changed files with 8 additions and 4 deletions
12
src/init.cpp
12
src/init.cpp
|
@ -199,8 +199,6 @@ void Shutdown(InitInterfaces& interfaces)
|
|||
// using the other before destroying them.
|
||||
if (peerLogic) UnregisterValidationInterface(peerLogic.get());
|
||||
if (g_connman) g_connman->Stop();
|
||||
if (g_txindex) g_txindex->Stop();
|
||||
ForEachBlockFilterIndex([](BlockFilterIndex& index) { index.Stop(); });
|
||||
|
||||
StopTorControl();
|
||||
|
||||
|
@ -214,8 +212,6 @@ void Shutdown(InitInterfaces& interfaces)
|
|||
peerLogic.reset();
|
||||
g_connman.reset();
|
||||
g_banman.reset();
|
||||
g_txindex.reset();
|
||||
DestroyAllBlockFilterIndexes();
|
||||
|
||||
if (::mempool.IsLoaded() && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
||||
DumpMempool(::mempool);
|
||||
|
@ -248,6 +244,14 @@ void Shutdown(InitInterfaces& interfaces)
|
|||
// CValidationInterface callbacks, flush them...
|
||||
GetMainSignals().FlushBackgroundCallbacks();
|
||||
|
||||
// Stop and delete all indexes only after flushing background callbacks.
|
||||
if (g_txindex) {
|
||||
g_txindex->Stop();
|
||||
g_txindex.reset();
|
||||
}
|
||||
ForEachBlockFilterIndex([](BlockFilterIndex& index) { index.Stop(); });
|
||||
DestroyAllBlockFilterIndexes();
|
||||
|
||||
// Any future callbacks will be dropped. This should absolutely be safe - if
|
||||
// missing a callback results in an unrecoverable situation, unclean shutdown
|
||||
// would too. The only reason to do the above flushes is to let the wallet catch
|
||||
|
|
Loading…
Reference in a new issue