Fix canonical tick bounds and maker validation#71
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR widens protocol price and maker tick bounds, updates boundary conversion and tick tests, and strengthens ChangesMaker tick bounds
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/convert.rs`:
- Around line 590-598: The price_1e-6_works test currently only checks success
and the conversion produces one unit below MIN_SQRT_PRICE_X96. Update
price_to_sqrt_price_x96’s rounding or boundary clamping so the exact 1e-6 input
returns MIN_SQRT_PRICE_X96, then change the test to assert equality with that
constant rather than only asserting is_ok().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 550305b4-6111-4a22-a7fe-5ae06712afee
📒 Files selected for processing (4)
src/client/trades.rssrc/constants.rssrc/convert.rssrc/math/tick.rs
Praz314159
left a comment
There was a problem hiding this comment.
approving, but it seems like its worth fixing the off-by-1 error
Summary by CodeRabbit
New Features
1e-6to1e6ranges.Bug Fixes
Tests