Skip to content

fix: properly skip evodb repair on reindex#7222

Merged
PastaPastaPasta merged 1 commit intodashpay:developfrom
UdjinM6:fi_evodb_repair_skip_reindex
Mar 14, 2026
Merged

fix: properly skip evodb repair on reindex#7222
PastaPastaPasta merged 1 commit intodashpay:developfrom
UdjinM6:fi_evodb_repair_skip_reindex

Conversation

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Mar 13, 2026

Issue being fixed or feature implemented

ThreadImport can switch fReindex from true to false, so we can't rely on it later.

Consider backporting in #7214

What was done?

How Has This Been Tested?

Reindex and check logs once all blocks are processed:
develop: "RecalculateAndRepairDiffs ..."
this PR: "Skipping evodb repair during reindex"

Breaking Changes

n/a

Checklist:

  • 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
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@UdjinM6 UdjinM6 added this to the 23.1.2 milestone Mar 13, 2026
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@UdjinM6 UdjinM6 changed the title fix: properlyy skip evodb repair on reindex fix: properly skip evodb repair on reindex Mar 13, 2026
@UdjinM6 UdjinM6 force-pushed the fi_evodb_repair_skip_reindex branch from 7e49fb8 to 8670238 Compare March 13, 2026 18:54
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 449f7580-1ccd-4e16-8239-b0b0d7370706

📥 Commits

Reviewing files that changed from the base of the PR and between 689fd57 and 8670238.

📒 Files selected for processing (1)
  • src/init.cpp

Walkthrough

This change captures the original reindex state by evaluating fReindex || fReindexChainState before ThreadImport execution and stores it in a new local variable skip_evodb_repair_on_reindex. The code then uses this captured value instead of dynamically checking fReindex || fReindexChainState later, ensuring that the logic decision reflects the state at the point of capture rather than any state changes that may occur during ThreadImport execution. A comment is added to clarify that ThreadImport may modify fReindex during its operation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: properly skipping evodb repair on reindex, which matches the core change captured in the file summary.
Description check ✅ Passed The description is related to the changeset, explaining the issue (ThreadImport can switch fReindex), what was done, how it was tested, and includes testing evidence (log output comparison).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

@PastaPastaPasta PastaPastaPasta merged commit 437e125 into dashpay:develop Mar 14, 2026
79 of 81 checks passed
thepastaclaw pushed a commit to thepastaclaw/dash that referenced this pull request Mar 14, 2026
8670238 fix: properly skip evodb repair on reindex (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  `ThreadImport` can switch `fReindex` from `true` to `false`, so we can't rely on it later.

  Consider backporting in dashpay#7214

  ## What was done?

  ## How Has This Been Tested?
  Reindex and check logs once all blocks are processed:
  develop: "RecalculateAndRepairDiffs ..."
  this PR: "Skipping evodb repair during reindex"

  ## Breaking Changes
  n/a

  ## Checklist:
  - [ ] 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
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: d1a36800a83fc3165a49c983b527429b04dcebca22d5f880709786c40e9a61894e7a63216daa7e5a2ebd860b8f13f1e8d48e88c41cb7e4a9e6d4814648f91b4a
thepastaclaw added a commit to thepastaclaw/dash that referenced this pull request Mar 14, 2026
PastaPastaPasta added a commit that referenced this pull request Mar 14, 2026
 into v23.1.x

da16809 docs: add #7221 and #7222 to v23.1.2 release notes (PastaClaw)
8a93926 Merge #7222: fix: properly skip evodb repair on reindex (pasta)
b74b549 Merge #7221: refactor: rename bitcoin-util manpage and test references to dash-util (pasta)
81464ac Merge #7211: fix: qt info tab layout (pasta)
7c27c2f Merge #7209: fix: serialize TrySignChainTip to prevent concurrent signing race (pasta)
81d5eb2 Merge #7208: fix: skip collecting block txids during IBD to prevent unbounded memory growth (pasta)

Pull request description:

  ## Backport

  Cherry-picks of #7208, #7209, #7211, #7221, and #7222 into `v23.1.x` for v23.1.2.

  ### Included

  - #7208 — `fix: skip collecting block txids during IBD to prevent unbounded memory growth`
  - #7209 — `fix: serialize TrySignChainTip to prevent concurrent signing race`
  - #7211 — `fix: qt info tab layout`
  - #7221 — `refactor: rename bitcoin-util manpage and test references to dash-util`
  - #7222 — `fix: properly skip evodb repair on reindex`

ACKs for top commit:
  UdjinM6:
    utACK da16809

Tree-SHA512: bbe74a62fd34bdcaece22100050072706774854db47d61af644700ca063e2a3cdfd474fa451681861bf1a6e91436ebd3715838640fc992fbba7c2b57b4f02760
PastaPastaPasta added a commit that referenced this pull request Mar 16, 2026
da16809 docs: add #7221 and #7222 to v23.1.2 release notes (PastaClaw)
8a93926 Merge #7222: fix: properly skip evodb repair on reindex (pasta)
b74b549 Merge #7221: refactor: rename bitcoin-util manpage and test references to dash-util (pasta)
81464ac Merge #7211: fix: qt info tab layout (pasta)
7c27c2f Merge #7209: fix: serialize TrySignChainTip to prevent concurrent signing race (pasta)
81d5eb2 Merge #7208: fix: skip collecting block txids during IBD to prevent unbounded memory growth (pasta)
d02243c ci: run check-skip on blacksmith with GitHub-hosted fallback (PastaClaw)
033b3fe chore: regenerate manpages for v23.1.2 (PastaClaw)
ff965b5 chore: v23.1.2 release preparation (PastaClaw)
8d5936d chore: add #7191 and #7193 to v23.1.1 release notes (PastaClaw)
9f3662b chore: v23.1.1 release preparation (PastaClaw)
5dbfa98 chore: v23.1.1 release preparation (PastaClaw)
240a95f Merge #7193: fix: reject identity elements in deserialization and key generation (pasta)
444cbf2 Merge #7191: fix(qt): reseat quorum labels when new types are inserted (pasta)
00f590d Merge #7180: qt: add Tahoe styled icons for macOS, runtime styling for each network type, update bundle icon, add mask-based tray icon, generation scripts (pasta)
60dda51 Merge #7176: perf: do linear lookup instead building 2 heavy Hash-Maps (pasta)
df1ca87 Merge #7159: feat(qt): UI refresh (5/n, add proposal information widget to information, donut chart for proposal allocation) (pasta)
9061ad0 Merge #7118: feat(qt): UI refresh (4/n, introduce distinct widgets for Dash-specific reporting in debug window) (pasta)
64cc4f2 Merge #7160: feat(interfaces): consolidate masternode counts into one struct, expose chainlock, instantsend, credit pool, quorum statistics (pasta)
5d28a69 Merge #7157: fix(qt): prevent banned masternodes from returning status=0 (pasta)
e0b7386 Merge #7146: feat(qt): introduce framework for sourcing and applying data, use for `{Masternode,Proposal}List`s (pasta)
8fd53cd Merge #7144: feat(qt): add support for reporting `OP_RETURN` payloads as Data Transactions (pasta)
cc6f0bb Merge #7154: fix: MN update notifications had old_list/new_list swapped (pasta)
33f0138 Merge #7145: fix(qt): move labelError styling from proposalcreate.ui into general.css (pasta)
1bdbde6 Merge #7148: feat(qt): persist filter preferences in masternode list (pasta)
96bb601 Merge #7147: fix(qt): prevent overview page font double scaling, recalculate minimum width correctly, `SERVICE` and `STATUS` sorting, fix common types filtering (pasta)
da1e336 build: expand minimum Darwin version to macOS 11 (Big Sur) (Kittywhiskers Van Gogh)

Pull request description:

  ## Issue being fixed or feature implemented
  Note: Skipping changes from #7149 which was for the v23.1.x only.

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [ ] 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
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  kwvg:
    utACK 36988f9

Tree-SHA512: f5bf8f0af11379bbcea606108ee90af08c16f588ebdbfac1fdd567adfcad14926b9c797c8fa6b398fb65fc3210c5f2c084015ea07718371df04e2412625f42d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants