Implement clearing the regular key, setting and clearing the no master

flag and enforcing the no master flag.
This commit is contained in:
JoelKatz
2013-06-17 12:14:03 -07:00
parent 1886283244
commit 36a84484e0
9 changed files with 57 additions and 6 deletions

View File

@@ -38,8 +38,17 @@ TER RegularKeySetTransactor::doApply ()
mTxnAccount->setFlag (lsfPasswordSpent);
}
uint160 uAuthKeyID = mTxn.getFieldAccount160 (sfRegularKey);
mTxnAccount->setFieldAccount (sfRegularKey, uAuthKeyID);
if (mTxn.isFieldPresent (sfRegularKey))
{
uint160 uAuthKeyID = mTxn.getFieldAccount160 (sfRegularKey);
mTxnAccount->setFieldAccount (sfRegularKey, uAuthKeyID);
}
else
{
if (mTxnAccount->isFlag (lsfDisableMaster))
return tefMASTER_DISABLED;
mTxnAccount->makeFieldAbsent (sfRegularKey);
}
std::cerr << "RegularKeySet<" << std::endl;