Skip to content

fix(dash-spv): stop discarding a readable masternode snapshot - #1247

Merged
ZocoLini merged 1 commit into
devfrom
fix/masternode-snapshot-partial-restore
Oct 28, 2026
Merged

ZocoLini merged 1 commit into
devfrom
fix/masternode-snapshot-partial-restore

Conversation

@xdustinface

@xdustinface xdustinface commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Split out of #1227.

Any error reading the masternode engine snapshot removed it, including an I/O error that may clear on a later launch, such as a read refused by iOS data protection while the device is locked. Only a snapshot that does not decode is removed now.

Headers are stored every 5 seconds and the snapshot after each QRInfo, so after a crash the snapshot can hold lists above the stored header tip. The whole snapshot was discarded then. It is now restored up to its newest list still in the header chain, through MasternodeListEngine::truncate_above.

PR Hygiene · a77cb45

  • Bots — coderabbitai skipped by xdustinface
  • Self-review — posted; again after any push
  • Build running
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Any error reading the snapshot removed it, including an I/O error that may clear on a later launch, such as a read refused by iOS data protection while the device is locked. Only a snapshot that does not decode is removed now.

Headers are stored every 5 seconds and the snapshot after each QRInfo, so after a crash the snapshot can hold lists above the stored header tip. The whole snapshot was discarded then. It is now restored up to its newest list still in the header chain, through `MasternodeListEngine::truncate_above`.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 50a97a3 and a77cb45.

Files selected for processing: 1
  • dash-spv/src/storage/masternode.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.06%. Comparing base (50a97a3) to head (a77cb45).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1247   +/-   ##
=======================================
  Coverage   79.06%   79.06%           
=======================================
  Files         298      298           
  Lines       79058    79080   +22     
=======================================
+ Hits        62506    62524   +18     
- Misses      16552    16556    +4     
Flag Coverage Δ
core 77.85% <ø> (ø)
ffi 52.97% <ø> (ø)
rpc 52.05% <ø> (ø)
spv 93.49% <100.00%> (-0.02%) ⬇️
wallet 82.49% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/storage/masternode.rs 100.00% <100.00%> (+1.76%) ⬆️

... and 2 files with indirect coverage changes

@xdustinface

Copy link
Copy Markdown
Collaborator Author

/skip-bots

@xdustinface

Copy link
Copy Markdown
Collaborator Author

/self-reviewed

@github-actions github-actions Bot added bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Oct 28, 2026
@ZocoLini
ZocoLini merged commit 9e63b47 into dev Oct 28, 2026
62 of 64 checks passed
@ZocoLini
ZocoLini deleted the fix/masternode-snapshot-partial-restore branch October 28, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants