mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 17:27:00 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user