refactor: Use hasExpired in CancelCheck - #6533
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors CancelCheck::preclaim to use the shared hasExpired(ReadView, optional<uint32_t>) helper for check expiration logic, aligning this transactor with other expiration checks in the codebase.
Changes:
- Replaced inline expiration comparison logic with
hasExpired(ctx.view, (*sleCheck)[~sfExpiration]). - Removed now-unneeded local
NetClocktype aliases and intermediateoptExpiryvariable.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6533 +/- ##
=======================================
Coverage 79.8% 79.9%
=======================================
Files 878 878
Lines 67888 67887 -1
Branches 7552 7546 -6
=======================================
+ Hits 54203 54214 +11
+ Misses 13685 13673 -12
🚀 New features to boost your workflow:
|
a1q123456
left a comment
There was a problem hiding this comment.
LGTM. Have checked the logic and can confirm it's identical.
Add .clang-tidy with commented out check Fix suggestions Bring back BEAST_EXPECT Address more comments Fix compilation error Fix review suggestions refactor: use `hasExpired` in `CancelCheck` (XRPLF#6533)
High Level Overview of Change
Title says it pretty much in its entirety. This simplifies the code a bit and aligns it with other expiry calls.
Worth checking in review as well, but
hasExpiredis identical to the code being replaced, so no amendment is needed here.Context of Change
AI code review
Type of Change
API Impact
N/A