示例#1
0
TER
SetRegularKey::doApply ()
{
    auto const sle = view().peek(
        keylet::account(account_));

    if (mFeeDue == zero)
        sle->setFlag (lsfPasswordSpent);

    if (ctx_.tx.isFieldPresent (sfRegularKey))
    {
        sle->setAccountID (sfRegularKey,
            ctx_.tx.getAccountID (sfRegularKey));
    }
    else
    {
        if (sle->isFlag (lsfDisableMaster) &&
            !view().peek (keylet::signers (account_)))
            // Account has disabled master key and no multi-signer signer list.
            return tecNO_ALTERNATIVE_KEY;

        sle->makeFieldAbsent (sfRegularKey);
    }

    return tesSUCCESS;
}
示例#2
0
bool RippleAddress::setAccountID(const std::string& strAccountID)
{
	if (strAccountID.empty())
	{
		setAccountID(uint160());

		return true;
	}
	else
	{
		return SetString(strAccountID.c_str(), VER_ACCOUNT_ID);
	}
}
示例#3
0
bool RippleAddress::setAccountID (const std::string& strAccountID, Base58::Alphabet const& alphabet)
{
    if (strAccountID.empty ())
    {
        setAccountID (uint160 ());

        mIsValid    = true;
    }
    else
    {
        mIsValid = SetString (strAccountID, VER_ACCOUNT_ID, alphabet);
    }

    return mIsValid;
}
示例#4
0
bool RippleAddress::setAccountID (const std::string& strAccountID, const char* pAlphabet)
{
    if (strAccountID.empty ())
    {
        setAccountID (uint160 ());

        mIsValid    = true;
    }
    else
    {
        mIsValid    = SetString (strAccountID.c_str (), VER_ACCOUNT_ID, pAlphabet);
    }

    return mIsValid;
}