-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: fix flaky v2transport_test off-by-one in Dash short ID range #7097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
The test was generating "unknown" short IDs in range [168, 255], but 168 is PLATFORMBAN (last valid Dash ID). When InsecureRandRange(88) returned 0, the test would send a valid message that decoded successfully, causing the BOOST_CHECK(!(*ret)[0]) assertion to fail. Fix by starting the invalid range at 169 instead of 168. Fixes dashpay#7093 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
WalkthroughA test in Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.{cpp,h,hpp,cc}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/{test,wallet/test}/**/*.{cpp,h}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-11-24T16:41:22.457ZApplied to files:
📚 Learning: 2025-08-08T07:01:47.332ZApplied to files:
🧬 Code graph analysis (1)src/test/net_tests.cpp (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (2)
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 |
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 289df5f
kwvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 289df5f
Issue being fixed or feature implemented
The test was generating "unknown" short IDs in range [168, 255], but 168 is PLATFORMBAN (last valid Dash ID). When InsecureRandRange(88) returned 0, the test would send a valid message that decoded successfully, causing the BOOST_CHECK(!(*ret)[0]) assertion to fail.
Follow-up to #7082
What was done?
Fix by starting the invalid range at 169 instead of 168.
Fixes #7093
How Has This Been Tested?
Run
./src/test/test_dash --run_test=net_tests/v2transport_testin a loopBreaking Changes
n/a
Checklist: