fix: deduplicate QRINFO base blocks#7349
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR modifies the quorum rotation snapshot construction to unconditionally sort and deduplicate base block indexes by ascending block height. Previously, this sorting was applied only under legacy construction; now it applies to all paths. The change adds Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)src/llmq/snapshot.cppsrc/llmq/snapshot.cpp:5:10: fatal error: 'llmq/snapshot.h' file not found ... [truncated 2200 characters] ... , characters 22-60 src/test/llmq_snapshot_tests.cppsrc/test/llmq_snapshot_tests.cpp:5:10: fatal error: 'test/util/llmq_tests.h' file not found ... [truncated 1115 characters] ... ll/lib/clang/18/include" 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. Comment |
|
✅ Review complete (commit e34105f) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Both agents converged on no findings for this small, well-scoped fix that sorts and deduplicates QRINFO baseBlockIndexes. CodeRabbit also reported no inline findings. The change is covered by both unit and functional tests.
Issue being fixed or feature implemented
QRINFO request handling accepts caller-provided base block hashes and carries the
validated block indexes through quorum rotation response construction. Repeated
base hashes do not add useful information, so this change canonicalizes those
base indexes before the builder phases use them.
Provenance: thepastaclaw/tracker#1450
What was done?
paths.
result as a single base hash.
How Has This Been Tested?
Environment: macOS arm64, local Dash Core worktree based on
upstream/develop.Commands run:
git diff --check upstream/develop..HEAD— passedmake -C src -j$(sysctl -n hw.ncpu) test/test_dash— passed earlier in thisworktree before the final Python-only test addition
src/test/test_dash --run_test=llmq_snapshot_tests/get_last_base_block_hash_repeated_base_blocks_test— passed
test/functional/feature_llmq_rotation.py— skipped locally because thisworktree was configured with
--disable-walletcode-review dashpay/dash upstream/develop fix/qrinfo-dedupe-base-hashes ...— passed with recommendation: ship
Also checked:
gh api repos/dashpay/dash --jq '.default_branch'—developopen PR found
Breaking Changes
None expected.
Checklist: