fix: Block delegate tx from being queued - #7640
Conversation
bb09077 to
d1e01dd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
ximinez
left a comment
There was a problem hiding this comment.
Other than adding the test @shawnxie999 asked for, this looks good.
There was a problem hiding this comment.
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
sfDelegatefrom 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.
High Level Overview of Change
delegate tx is disallowed to enter txQ
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)