- Move amendmentCombinations algorithm to jtx::amendmentCombinations in
test/jtx/utility.h+cpp; it was copy-pasted into both AMM_test and
AMMMPT_test. AMM_test retains a one-liner wrapper that seeds from its
local testableAmendments() (strips SAV/Lending).
- Document the isVaultPseudoAccountFrozen sub-step in the Doxygen for
checkWithdrawFreeze and checkDepositFreeze; the MPT-only transitive
freeze check occurs between the listed steps 1 and 2 in each function.
- Expand the IgnoreFreeze comment in VaultWithdraw::doApply to explain
why preclaim validation makes the flag safe to use post-fix330.
Restore unconditional IgnoreFreeze in VaultWithdraw::doApply when
fixCleanup3_3_0 is enabled. That accountHolds reads the submitter's
share balance, which recurses into the underlying asset, so freeze
gating must stay in preclaim; a dstAcct==issuer guard there wrongly
blocked self-withdrawal under a regular freeze.
Apply issuer-aware freeze handling to LoanBrokerCoverWithdraw::preclaim
so the issuer can redeem their own token from the broker pseudo-account
even under a global freeze, matching AMM and Vault. Here accountHolds
reads the pseudo-account's holdings, so the issuer-only IgnoreFreeze is
both necessary and sufficient.
Rename the checkWithdrawFreeze source parameter to srcAcct to match its
definition, drop a misleading comment, and hoist the fixCleanup feature
flags into named locals.
Migrate AMMDeposit and AMMWithdraw to use the unified freeze helpers
introduced for Vault and LoanBroker, gated on fixCleanup3_3_0.
AMMDeposit: checkDepositFreeze for both pool assets replaces the
two-layer checkAsset + checkAmount freeze logic. If either pool asset
is frozen (depositor or AMM account), all deposits are blocked.
AMMWithdraw: checkWithdrawFreeze per withdrawn amount replaces
checkFrozen(AMM) + checkIndividualFrozen(user). Regular IOU freeze
no longer blocks self-withdrawal; only deep freeze does. The issuer
exemption allows the token issuer to withdraw from a frozen pool;
issuerFreezeHandling() ensures doApply uses IgnoreFreeze so pool
math does not divide by zero.
Rename checkWithdrawFreezes -> checkWithdrawFreeze (singular) and
update all callers. Document both helpers with full freeze semantics.
Add checkDepositFreeze that checks the depositor for regular freeze and
the destination pseudo-account for deep freeze only. A regular freeze on
the vault account's trust line no longer blocks deposits.
Update checkWithdrawFreezes to skip the submitter freeze check when
submitter == destination (withdrawing to self).
Gate VaultDeposit with fixCleanup3_3_0; pre-fix path preserves the old
isFrozen-based checks. Use checkDepositFreeze in LoanBrokerCoverDeposit.
Introduce checkWithdrawFreezes helper gated behind fixCleanup3_3_0 that
consolidates source, submitter, and destination freeze checks for
pseudo-account withdrawals. The issuer-redemption exemption is now
handled in one place rather than scattered across callers.
Add MPT individual-lock tests for depositor and 3rd-party destination
withdrawal scenarios, and extend LoanBrokerCoverWithdraw with the same
consolidated freeze logic.