From c68bacc8da9d24852363823e19fbd63d1d40478a Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Tue, 1 Sep 2026 18:30:15 +0200 Subject: [PATCH] test: Describe XRP zero-withdraw SUCCESS as collapse-to-absence The sponsored leftover-share case is the missing-recipient-delta arm after economically-zero XRP is collapsed, not the present-delta ternary. --- src/test/app/vault/VaultBugs_test.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/test/app/vault/VaultBugs_test.cpp b/src/test/app/vault/VaultBugs_test.cpp index f6c9feb7c2..0cdbdb564d 100644 --- a/src/test/app/vault/VaultBugs_test.cpp +++ b/src/test/app/vault/VaultBugs_test.cpp @@ -1868,11 +1868,15 @@ private: } // Same zero-payout withdrawal as testBugMptZeroWithdrawMissingHolding, but - // the vault asset is XRP. addEmptyHolding is a no-op for native assets, so - // skipping it does not hide the sender AccountRoot: sequence processing - // still touches it. A sponsored fee leaves that root economically - // unchanged (present-with-zero). Post-fixCleanup3_4_0 that one-sided zero - // destination delta must not fail ValidVault. + // the vault asset is XRP. addEmptyHolding is a no-op for native assets. + // Sequence processing still touches the sender AccountRoot; a sponsored + // fee leaves that XRP balance economically unchanged. After the + // sponsored-withdraw fee-payer fix, deltaAssetsForParty collapses that + // economically-zero XRP delta to absence, so tesSUCCESS takes the + // missing-recipient-delta arm gated by zeroDeltaIsLegitimate. This test + // covers that live SUCCESS path; it does not execute the present-delta + // zeroDeltaIsLegitimate disjunct. Pre-fixCleanup3_4_0 still fails the + // invariant. void testBugXrpZeroWithdrawSponsoredFee() {