Repository navigation
Conversation
|
Warning Review limit reachedYou'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 2 minutes. View limit details
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. |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1276 +/- ##
==========================================
+ Coverage 80.73% 80.74% +0.01%
==========================================
Files 291 291
Lines 77841 77892 +51
==========================================
+ Hits 62847 62897 +50
- Misses 14994 14995 +1
|
…dError FeedError was only ever used with SmlError or QuorumValidationError. Name the two cases instead of keeping a type parameter, which also lets thiserror derive the StorageError conversions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
d0da8a6 to
a41e72e
Compare
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
xdustinface
left a comment
There was a problem hiding this comment.
Hm, so we would duplicate the enum with its variants and message and we would still have handwritten conversion and the comments are gone. Can you explain why this is better?
|
Bots are done — your move: post |
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
|
nvm |
FeedError<E>is only everFeedError<SmlError>orFeedError<QuorumValidationError>. The type parameter forced a hand-writtenFrom<StorageError>for each of them, and the names didn't say which message was refused.They are now two enums, each with
HeaderStorage(StorageError)andRefused(_):DiffFeedError, refusing withSmlError, returned byapply_diff.QRInfoFeedError, refusing withQuorumValidationError, returned byfeed_qr_info.thiserrornow derives theStorageErrorconversions, and the one conversion left by hand isDiffFeedErrortoQRInfoFeedError, for the diffs a QRInfo applies.apply_diffstill reports the exactSmlError, so an exhaustivematchon the refusal reason keeps working.The variant docs are gone from both enums.
Breaking for
test_utilsusers, becauseFeedErroris replaced by the two new types.Testing:
cargo clippy -p dash-spv --all-targets --all-features -- -D warnings,cargo fmt --checkandcargo doc -p dash-spv --no-deps --all-featurespass, and so doescargo test -p dash-spv --lib -- sml_engine validation sync::masternodes, which last ran before the docs were removed. The dashd tests were not run locally.🤖 Generated with Claude Code
PR Hygiene ·
a41e72e/self-revieweddash-spv(dash-spv/src/sml_engine.rs,dash-spv/src/test_utils/mod.rs,dash-spv/src/validation/masternode_list.rs) — QuantumExplorer or xdustinfaceWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.