mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-05 08:47:53 +00:00
issuing URITokens is account deletion blocker
This commit is contained in:
committed by
RichardAH
parent
ac5ff4ca32
commit
1516900c4f
@@ -224,6 +224,11 @@ DeleteAccount::preclaim(PreclaimContext const& ctx)
|
||||
return tecHAS_OBLIGATIONS;
|
||||
}
|
||||
|
||||
// accounts that have issued URITokens are not allowed to be deleted
|
||||
// this should be updated in future to be a counter
|
||||
if (sleAccount->getFlags() & lsfURITokenIssuer)
|
||||
return tecHAS_OBLIGATIONS;
|
||||
|
||||
if (ctx.view.rules().enabled(featureNonFungibleTokensV1))
|
||||
{
|
||||
// If an issuer has any issued NFTs resident in the ledger then it
|
||||
|
||||
@@ -424,6 +424,9 @@ URIToken::doApply()
|
||||
sleU->setFieldU64(sfOwnerNode, *page);
|
||||
view().insert(sleU);
|
||||
|
||||
// ensure there is a deletion blocker against the issuer now
|
||||
sle->setFieldU32(sfFlags, sle->getFlags() | lsfURITokenIssuer);
|
||||
|
||||
adjustOwnerCount(view(), sle, 1, j);
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -283,6 +283,8 @@ enum LedgerSpecificFlags {
|
||||
0x10000000, // True, reject new paychans
|
||||
lsfDisallowIncomingTrustline =
|
||||
0x20000000, // True, reject new trustlines (only if no issued assets)
|
||||
lsfURITokenIssuer =
|
||||
0x40000000, // True, has minted tokens in the past
|
||||
|
||||
// ltOFFER
|
||||
lsfPassive = 0x00010000,
|
||||
|
||||
Reference in New Issue
Block a user