Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid crashes on "corrupted db" reindex attempts (dashpay#5717)
## Issue being fixed or feature implemented Should fix crashes like ``` : Corrupted block database detected. Please restart with -reindex or -reindex-chainstate to recover. Assertion failure: assertion: globalInstance == nullptr file: mnhftx.cpp, line: 43 function: CMNHFManager 0#: (0x105ADA27C) stacktraces.cpp:629 - __assert_rtn 1#: (0x104945794) mnhftx.cpp:43 - CMNHFManager::CMNHFManager(CEvoDB&) 2#: (0x10499DA90) compressed_pair.h:40 - std::__1::__unique_if<CMNHFManager>::__unique_single std::__1::make_unique[abi:v15006]<CMNHFManager, CEvoDB&>(CEvoDB&) 3#: (0x10499753C) init.cpp:1915 - AppInitMain(std::__1::variant<std::__1::nullopt_t, std::__1::reference_wrapper<NodeContext>, std::__1::reference_wrapper<WalletContext>, std::__1::reference_wrapper<CTxMemPool>, std::__1::reference_wrapper<ChainstateManager>, std::__1::reference_wrapper<CBlockPolicyEstimator>, std::__1::reference_wrapper<LLMQContext>> const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) ``` ## What was done? ## How Has This Been Tested? ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
- Loading branch information