mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make TrustSet disallow ACCOUNT_ONE.
This commit is contained in:
@@ -23,7 +23,7 @@ TER TrustSetTransactor::doApply()
|
||||
|
||||
return temBAD_AMOUNT;
|
||||
}
|
||||
else if (!uDstAccountID)
|
||||
else if (!uDstAccountID || uDstAccountID == ACCOUNT_ONE)
|
||||
{
|
||||
Log(lsINFO) << "doTrustSet: Malformed transaction: Destination account not specified.";
|
||||
|
||||
@@ -36,7 +36,7 @@ TER TrustSetTransactor::doApply()
|
||||
return temDST_IS_SRC;
|
||||
}
|
||||
|
||||
SLE::pointer sleDst = mEngine->entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uDstAccountID));
|
||||
SLE::pointer sleDst = mEngine->entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uDstAccountID));
|
||||
if (!sleDst)
|
||||
{
|
||||
Log(lsINFO) << "doTrustSet: Delay transaction: Destination account does not exist.";
|
||||
@@ -44,7 +44,7 @@ TER TrustSetTransactor::doApply()
|
||||
return terNO_DST;
|
||||
}
|
||||
|
||||
STAmount saLimitAllow = saLimitAmount;
|
||||
STAmount saLimitAllow = saLimitAmount;
|
||||
saLimitAllow.setIssuer(mTxnAccountID);
|
||||
|
||||
SLE::pointer sleRippleState = mEngine->entryCache(ltRIPPLE_STATE, Ledger::getRippleStateIndex(mTxnAccountID, uDstAccountID, uCurrencyID));
|
||||
@@ -144,4 +144,6 @@ TER TrustSetTransactor::doApply()
|
||||
Log(lsINFO) << "doTrustSet<";
|
||||
|
||||
return terResult;
|
||||
}
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user