extend escrow to psuedo and blackholed

- allow LP tokens
- allow blackholed accounts
This commit is contained in:
Denis Angell
2026-02-06 10:57:40 +01:00
parent c543d42029
commit 945c19564e
7 changed files with 241 additions and 7 deletions

View File

@@ -653,7 +653,8 @@ pseudoAccountAddress(ReadView const& view, uint256 const& pseudoOwnerKey);
createPseudoAccount(
ApplyView& view,
uint256 const& pseudoOwnerKey,
SField const& ownerField);
SField const& ownerField,
std::uint32_t additionalFlags = 0);
// Returns true iff sleAcct is a pseudo-account or specific
// pseudo-accounts in pseudoFieldFilter.
@@ -688,6 +689,13 @@ isPseudoAccount(
view.read(keylet::account(accountId)), pseudoFieldFilter);
}
// Returns true if the account is blackholed:
// - lsfDisableMaster is set
// - Regular key (if present) is AccountID(0), AccountID(1), or AccountID(2)
// - No signer list exists
[[nodiscard]] bool
isBlackholed(ReadView const& view, std::shared_ptr<SLE const> const& sle);
[[nodiscard]] TER
canAddHolding(ReadView const& view, Asset const& asset);