Skip to content

fix: Block delegate tx from being queued#7640

Merged
bthomee merged 2 commits into
XRPLF:developfrom
yinyiqian1:block-delegate-txQ
Jun 26, 2026
Merged

fix: Block delegate tx from being queued#7640
bthomee merged 2 commits into
XRPLF:developfrom
yinyiqian1:block-delegate-txQ

Conversation

@yinyiqian1

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

delegate tx is disallowed to enter txQ

Context of Change

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@yinyiqian1 yinyiqian1 force-pushed the block-delegate-txQ branch from bb09077 to d1e01dd Compare June 25, 2026 23:20
@yinyiqian1 yinyiqian1 added this to the 3.3.0 milestone Jun 25, 2026
@yinyiqian1 yinyiqian1 changed the title fix: block delegate tx from being queued fix: Block delegate tx from being queued Jun 25, 2026
Comment thread src/test/app/TxQ_test.cpp
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.0%. Comparing base (0711a7b) to head (9bfbe8e).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7640     +/-   ##
=========================================
- Coverage     82.0%   82.0%   -0.0%     
=========================================
  Files         1007    1007             
  Lines        76890   76890             
  Branches      8976    8972      -4     
=========================================
- Hits         63049   63040      -9     
- Misses       13832   13841      +9     
  Partials         9       9             
Files with missing lines Coverage Δ
src/xrpld/app/misc/detail/TxQ.cpp 97.1% <100.0%> (+<0.1%) ⬆️

... and 12 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.

ximinez
ximinez previously approved these changes Jun 26, 2026

@ximinez ximinez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Other than adding the test @shawnxie999 asked for, this looks good.

@shawnxie999 shawnxie999 mentioned this pull request Jun 26, 2026
13 tasks
@yinyiqian1 yinyiqian1 added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. and removed Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. labels Jun 26, 2026
@yinyiqian1 yinyiqian1 added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jun 26, 2026
@bthomee bthomee requested a review from Copilot June 26, 2026 20:21

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

This PR prevents delegated transactions (those with sfDelegate present) from being admitted into the transaction queue (TxQ), while still allowing them to apply directly to the open ledger when they pay the required open-ledger fee.

Changes:

  • Add a TxQ eligibility check that rejects any transaction containing sfDelegate from being queued (telCAN_NOT_QUEUE).
  • Add a unit test that verifies delegated transactions cannot be queued, but can still succeed when submitted with the open-ledger fee.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/xrpld/app/misc/detail/TxQ.cpp Rejects delegated transactions in TxQ::canBeHeld() so they can’t enter TxQ.
src/test/app/TxQ_test.cpp Adds coverage ensuring delegated txs are rejected from TxQ but still succeed with sufficient fee.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bthomee bthomee added this pull request to the merge queue Jun 26, 2026
Merged via the queue into XRPLF:develop with commit 652b5f9 Jun 26, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants