mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Flag setting for authorized accounts.
This commit is contained in:
@@ -19,6 +19,38 @@ TER AccountSetTransactor::doApply()
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
//
|
||||
// RequireAuth
|
||||
//
|
||||
|
||||
if ((tfRequireAuth|tfOptionalAuth) == (uTxFlags & (tfRequireAuth|tfOptionalAuth)))
|
||||
{
|
||||
cLog(lsINFO) << "AccountSet: Malformed transaction: Contradictory flags set.";
|
||||
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
if ((uTxFlags & tfRequireAuth) && !isSetBit(uFlagsIn, lsfRequireAuth))
|
||||
{
|
||||
if (mTxn.getFieldU32(sfOwnerCount))
|
||||
{
|
||||
cLog(lsINFO) << "AccountSet: Retry: OwnerCount not zero.";
|
||||
|
||||
return terOWNERS;
|
||||
}
|
||||
|
||||
cLog(lsINFO) << "AccountSet: Set RequireAuth.";
|
||||
|
||||
uFlagsOut |= lsfRequireAuth;
|
||||
}
|
||||
|
||||
if (uTxFlags & tfOptionalAuth)
|
||||
{
|
||||
cLog(lsINFO) << "AccountSet: Clear RequireAuth.";
|
||||
|
||||
uFlagsOut &= ~lsfRequireAuth;
|
||||
}
|
||||
|
||||
//
|
||||
// RequireDestTag
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user