Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid a crash on -reindex-chainstate (#5746)
## Issue being fixed or feature implemented Avoid a crash on -reindex-chainstate. ## What was done? `ResetBlockFailureFlags` is crashing when `m_chain.Tip()` is null. Call `ResetBlockFailureFlags` inside `if (!is_coinsview_empty(chainstate)) {...}` block - we know `m_chain.Tip()` is not null there. ## How Has This Been Tested? Try running a node with `-reindex-chainstate` cmd-line param w/ and w/out this patch. ## 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