fix: Prevents overwriting a bool value in an invariant#6609
Conversation
mvadari
left a comment
There was a problem hiding this comment.
This needs an amendment
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6609 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.0%
=========================================
Files 1010 1010
Lines 76048 76064 +16
Branches 7384 7378 -6
=========================================
+ Hits 62413 62424 +11
- Misses 13635 13640 +5
🚀 New features to boost your workflow:
|
|
/ai-review |
Three invariant checks used = instead of |= to accumulate their boolean flag across multiple visited entries. A later "good" entry could overwrite a violation detected by an earlier "bad" entry. Gate the corrected |= behavior behind fixInvariantOverwrite to preserve pre-amendment consensus. Each affected class tracks both the fixed (|=) and legacy (=) values; finalize picks which to use based on the amendment. Affected invariants: - NoZeroEscrow (bad_ for MPT locked vs outstanding) - NoXRPTrustLines (xrpTrustLine_) - NoDeepFreezeTrustLinesWithoutFreeze (deepFreezeWithoutFreeze_)
|
/ai-review |
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
|
Error: Bad response code, expected 200: {'status_code': 400, 'headers': {':exception-type': 'internalServerException', ':content-type': 'application/json', ':message-type': 'exception'}, 'body': b'{"message" Review by Claude Opus 4.6 · Prompt: v12 |
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
…bugfix * XRPLF/develop: chore: Enable clang-tidy modernize checks (6975) ci: Upload clang-tidy git diff (6983) fix: Add rounding to Vault invariants (6217) (6955) fix: Disallow MPTClearRequireAuth if is set (6712)
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
Co-authored-by: Vito <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@Tapanito please take a look at the Copilot review. If something needs changing, we should change that too in the staging branch. Otherwise, if Copilot is wrong please resolve the comment and indicate that this PR is ready to merge. |
Both the NoXRPTrustLines and NoDeepFreeze regression tests constructed a pair of keylets, hash-sorted them, and inserted two SLEs in that order - duplicating the ordering logic. Extract this into a local insertOrderedTrustLinePair helper so each test only configures what distinguishes its bad/good entries. Also fixes the NoDeepFreeze test, which previously chose between two unrelated key pairings (key_A2_usd/key_A3_eur vs key_A3_usd/key_A2_eur) based on a comparison only valid for the first pairing - the bad-first visit ordering the test relied on was not actually guaranteed.
Co-authored-by: Ed Hennis <[email protected]>
Co-authored-by: Ed Hennis <[email protected]>
This PR fixes a bug where boolean results could be overwritten by multiple calls to
visitEntry.Backport for 3.1.x: #6961.
High Level Overview of Change
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)