Flag setting for authorized accounts.

This commit is contained in:
Arthur Britto
2013-01-25 02:59:58 -08:00
parent ec7ce16f68
commit 01920bdef9
8 changed files with 77 additions and 7 deletions

View File

@@ -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
//