Sponsored Content
Skip to content

refactor: Use hasExpired in CancelCheck - #6533

Merged
bthomee merged 3 commits into
XRPLF:developfrom
mvadari:fix-hasexpired
Mar 16, 2026
Merged

refactor: Use hasExpired in CancelCheck#6533
bthomee merged 3 commits into
XRPLF:developfrom
mvadari:fix-hasexpired

Conversation

@mvadari

@mvadari mvadari commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

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 hasExpired is identical to the code being replaced, so no amendment is needed here.

Context of Change

AI code review

Type of Change

  • Refactor (non-breaking change that only restructures code)

API Impact

N/A

@mvadari
mvadari requested a review from bthomee March 11, 2026 21:18
@bthomee
bthomee requested review from a1q123456, Copilot and pratikmankawde and removed request for bthomee March 11, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NetClock type aliases and intermediate optExpiry variable.

💡 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

codecov Bot commented Mar 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.9%. Comparing base (e4dbaf5) to head (4f87adb).
⚠️ Report is 42 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           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     
Files with missing lines Coverage Δ
src/libxrpl/tx/transactors/check/CancelCheck.cpp 93.5% <100.0%> (-0.2%) ⬇️

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@a1q123456 a1q123456 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Have checked the logic and can confirm it's identical.

@pratikmankawde pratikmankawde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvadari mvadari added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval. labels Mar 16, 2026
@bthomee
bthomee enabled auto-merge (squash) March 16, 2026 16:35
@bthomee
bthomee merged commit 1a4c359 into XRPLF:develop Mar 16, 2026
3 checks passed
godexsoft added a commit to godexsoft/rippled that referenced this pull request Mar 16, 2026
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)
@mvadari mvadari added the AI Triage Bugs and fixes that have been triaged via AI initiatives label Mar 24, 2026
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Triage Bugs and fixes that have been triaged via AI initiatives Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants