test: Add withdrawal-to-issuer assertion in IOU global-freeze test

Mirror the MPT and trust-line-freeze variants: under global freeze the
redemption path (dstAcct == vaultAsset.getIssuer()) should still succeed.
This commit is contained in:
Vito
2026-06-03 17:58:02 +02:00
parent 42b7e858a4
commit 5abb72ec0a
2 changed files with 6 additions and 1 deletions

View File

@@ -283,7 +283,7 @@ VaultWithdraw::doApply()
auto const freezeHandling =
redeemingToIssuer ? FreezeHandling::IgnoreFreeze : FreezeHandling::ZeroIfFrozen;
// Share freeze checks are transitive. We skip them when withdrawing to the issuer all together.
// Share freeze checks are transitive. We skip them when withdrawing to the issuer alltogether.
if (accountHolds(view(), accountID_, share, freezeHandling, AuthHandling::IgnoreAuth, j_) <
sharesRedeemed)
{

View File

@@ -3538,6 +3538,11 @@ class Vault_test : public beast::unit_test::Suite
env(tx, Ter{tecFROZEN});
env.close();
// Withdrawal to the IOU issuer succeeds (redemption path)
tx[sfDestination] = issuer.human();
env(tx);
env.close();
// Cannot deposit some more
tx = vault.deposit({.depositor = owner, .id = keylet.key, .amount = asset(10)});