mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Implement clearing the regular key, setting and clearing the no master
flag and enforcing the no master flag.
This commit is contained in:
@@ -105,6 +105,34 @@ TER AccountSetTransactor::doApply ()
|
||||
uFlagsOut &= ~lsfDisallowXRP;
|
||||
}
|
||||
|
||||
//
|
||||
// DisableMaster
|
||||
//
|
||||
|
||||
if ((tfDisableMaster | tfEnableMaster) == (uTxFlags & (tfDisableMaster | tfEnableMaster)))
|
||||
{
|
||||
WriteLog (lsINFO, AccountSetTransactor) << "AccountSet: Malformed transaction: Contradictory flags set.";
|
||||
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
if ((uTxFlags & tfDisableMaster) && !isSetBit (uFlagsIn, lsfDisableMaster))
|
||||
{
|
||||
if (!mTxnAccount->isFieldPresent (sfRegularKey))
|
||||
return tefNO_REGULAR_KEY;
|
||||
|
||||
WriteLog (lsINFO, AccountSetTransactor) << "AccountSet: Set lsfDisableMaster.";
|
||||
|
||||
uFlagsOut |= lsfDisableMaster;
|
||||
}
|
||||
|
||||
if ((uTxFlags & tfEnableMaster) && isSetBit (uFlagsIn, lsfDisableMaster))
|
||||
{
|
||||
WriteLog (lsINFO, AccountSetTransactor) << "AccountSet: Clear lsfDisableMaster.";
|
||||
|
||||
uFlagsOut &= ~lsfDisableMaster;
|
||||
}
|
||||
|
||||
//
|
||||
// EmailHash
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user