mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +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;
|
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 (ctx.view.rules().enabled(featureNonFungibleTokensV1))
|
||||||
{
|
{
|
||||||
// If an issuer has any issued NFTs resident in the ledger then it
|
// If an issuer has any issued NFTs resident in the ledger then it
|
||||||
|
|||||||
@@ -424,6 +424,9 @@ URIToken::doApply()
|
|||||||
sleU->setFieldU64(sfOwnerNode, *page);
|
sleU->setFieldU64(sfOwnerNode, *page);
|
||||||
view().insert(sleU);
|
view().insert(sleU);
|
||||||
|
|
||||||
|
// ensure there is a deletion blocker against the issuer now
|
||||||
|
sle->setFieldU32(sfFlags, sle->getFlags() | lsfURITokenIssuer);
|
||||||
|
|
||||||
adjustOwnerCount(view(), sle, 1, j);
|
adjustOwnerCount(view(), sle, 1, j);
|
||||||
return tesSUCCESS;
|
return tesSUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,6 +283,8 @@ enum LedgerSpecificFlags {
|
|||||||
0x10000000, // True, reject new paychans
|
0x10000000, // True, reject new paychans
|
||||||
lsfDisallowIncomingTrustline =
|
lsfDisallowIncomingTrustline =
|
||||||
0x20000000, // True, reject new trustlines (only if no issued assets)
|
0x20000000, // True, reject new trustlines (only if no issued assets)
|
||||||
|
lsfURITokenIssuer =
|
||||||
|
0x40000000, // True, has minted tokens in the past
|
||||||
|
|
||||||
// ltOFFER
|
// ltOFFER
|
||||||
lsfPassive = 0x00010000,
|
lsfPassive = 0x00010000,
|
||||||
|
|||||||
Reference in New Issue
Block a user