mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
fix: reset chainman to allow reindex on failure (#5405)
current develop fails to reindex whenever there is an issue at node start (prints `should not be overwriting a chainstate` in `debug.log`) reset chainman to allow it re-initialize chainstate simulated an issue with ``` if (!fReset) { strLoadError = _("DEBUG"); break; } ``` should not be any but pls test - [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)_
This commit is contained in:
parent
013445a304
commit
ad09590feb
@ -2019,6 +2019,8 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
|
||||
LOCK(cs_main);
|
||||
node.evodb.reset();
|
||||
node.evodb = std::make_unique<CEvoDB>(nEvoDbCache, false, fReset || fReindexChainState);
|
||||
|
||||
chainman.Reset();
|
||||
chainman.InitializeChainstate(llmq::chainLocksHandler, llmq::quorumInstantSendManager, llmq::quorumBlockProcessor, node.evodb, *Assert(node.mempool));
|
||||
chainman.m_total_coinstip_cache = nCoinCacheUsage;
|
||||
chainman.m_total_coinsdb_cache = nCoinDBCache;
|
||||
|
Loading…
Reference in New Issue
Block a user