mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +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:
@@ -531,6 +531,11 @@ bool STObject::clearFlag (uint32 f)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool STObject::isFlag (uint32 f)
|
||||
{
|
||||
return (getFlags () & f) == f;
|
||||
}
|
||||
|
||||
uint32 STObject::getFlags (void) const
|
||||
{
|
||||
const STUInt32* t = dynamic_cast<const STUInt32*> (peekAtPField (sfFlags));
|
||||
|
||||
@@ -136,6 +136,7 @@ public:
|
||||
|
||||
bool setFlag (uint32);
|
||||
bool clearFlag (uint32);
|
||||
bool isFlag(uint32);
|
||||
uint32 getFlags () const;
|
||||
|
||||
uint256 getHash (uint32 prefix) const;
|
||||
|
||||
@@ -46,6 +46,8 @@ bool transResultInfo (TER terCode, std::string& strToken, std::string& strHuman)
|
||||
{ tefNO_AUTH_REQUIRED, "tefNO_AUTH_REQUIRED", "Auth is not required." },
|
||||
{ tefPAST_SEQ, "tefPAST_SEQ", "This sequence number has already past." },
|
||||
{ tefWRONG_PRIOR, "tefWRONG_PRIOR", "This previous transaction does not match." },
|
||||
{ tefMASTER_DISABLED, "tefMASTER_DISABLED", "Master key is disabled." },
|
||||
{ tefNO_REGULAR_KEY, "tefNO_REGULAR_KEY", "Regular key is not set." },
|
||||
|
||||
{ telLOCAL_ERROR, "telLOCAL_ERROR", "Local failure." },
|
||||
{ telBAD_DOMAIN, "telBAD_DOMAIN", "Domain too long." },
|
||||
|
||||
@@ -94,6 +94,8 @@ enum TER // aka TransactionEngineResult
|
||||
tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required.
|
||||
tefPAST_SEQ,
|
||||
tefWRONG_PRIOR,
|
||||
tefMASTER_DISABLED,
|
||||
tefNO_REGULAR_KEY,
|
||||
|
||||
// -99 .. -1: R Retry (sequence too high, no funds for txn fee, originating account non-existent)
|
||||
// Causes:
|
||||
|
||||
@@ -51,7 +51,7 @@ void TFInit ()
|
||||
;
|
||||
|
||||
DECLARE_TF (SetRegularKey, ttREGULAR_KEY_SET)
|
||||
<< SOElement (sfRegularKey, SOE_REQUIRED)
|
||||
<< SOElement (sfRegularKey, SOE_OPTIONAL)
|
||||
;
|
||||
|
||||
DECLARE_TF (Payment, ttPAYMENT)
|
||||
|
||||
Reference in New Issue
Block a user