refactor: Retire Clawback amendment#7353
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7353 +/- ##
=========================================
- Coverage 82.4% 82.4% -0.0%
=========================================
Files 1011 1011
Lines 76484 76542 +58
Branches 7316 7320 +4
=========================================
+ Hits 63007 63051 +44
- Misses 13477 13491 +14
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR retires the Clawback amendment by removing runtime feature-gating for Clawback-related behavior and registering the amendment as retired in the protocol feature registry. This aligns Clawback behavior with other retired amendments: the transaction type and related account flag handling are treated as always available, and tests are updated accordingly.
Changes:
- Remove
featureClawbackgating from RPCaccount_infooutput and fromAccountSetflag validation/application. - Mark Clawback as a retired amendment and remove it as a required feature for the
Clawbacktransaction type. - Update unit tests to no longer exercise “Clawback disabled” paths.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/xrpld/rpc/handlers/account/AccountInfo.cpp | Always reports allowTrustLineClawback in account_flags (no longer conditional on an amendment). |
| src/test/rpc/AccountInfo_test.cpp | Removes conditional expectations based on featureClawback; simplifies feature-matrix coverage accordingly. |
| src/test/app/Delegate_test.cpp | Drops Clawback from the transaction required-features map to match the transaction metadata change. |
| src/test/app/Clawback_test.cpp | Removes tests for disabled-amendment behavior and updates expected failure modes. |
| src/libxrpl/tx/transactors/account/AccountSet.cpp | Removes amendment gating for setting asfAllowTrustLineClawback and the related asfNoFreeze restriction. |
| include/xrpl/protocol/detail/transactions.macro | Changes ttCLAWBACK required amendment from featureClawback to uint256{} (no amendment requirement). |
| include/xrpl/protocol/detail/features.macro | Moves Clawback from active features to XRPL_RETIRE_FEATURE(Clawback). |
| include/xrpl/protocol_autogen/transactions/Clawback.h | Updates the autogenerated transaction doc comment to reflect “no amendment requirement”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // 1. when asfAllowTrustLineClawback flag has not been set | ||
| { | ||
| Env env(*this, features - featureClawback); | ||
| Env env(*this, features); |
There was a problem hiding this comment.
I don't think it makes sense to keep this test case.
|
@a1q123456 Comments have been addressed. |
High Level Overview of Change
This change set retires the Clawback amendment. All tests were updated to work correctly against retirement.
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)