mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
Fix setting the no ripple flag when a trust line is created.
This commit is contained in:
@@ -1347,6 +1347,7 @@ TER LedgerEntrySet::trustCreate (
|
||||
uint256 const& uIndex, // --> ripple state entry
|
||||
SLE::ref sleAccount, // --> the account being set.
|
||||
const bool bAuth, // --> authorize account.
|
||||
const bool bNoRipple, // --> others cannot ripple through
|
||||
const STAmount& saBalance, // --> balance of account being set. Issuer should be ACCOUNT_ONE
|
||||
const STAmount& saLimit, // --> limit for account being set. Issuer should be the account being set.
|
||||
const uint32 uQualityIn,
|
||||
@@ -1398,6 +1399,10 @@ TER LedgerEntrySet::trustCreate (
|
||||
{
|
||||
uFlags |= (!bSetHigh ? lsfLowAuth : lsfHighAuth);
|
||||
}
|
||||
if (bNoRipple)
|
||||
{
|
||||
uFlags |= (!bSetHigh ? lsfLowNoRipple : lsfHighNoRipple);
|
||||
}
|
||||
|
||||
sleRippleState->setFieldU32 (sfFlags, uFlags);
|
||||
|
||||
@@ -1475,6 +1480,7 @@ TER LedgerEntrySet::rippleCredit (const uint160& uSenderID, const uint160& uRece
|
||||
uIndex,
|
||||
entryCache (ltACCOUNT_ROOT, Ledger::getAccountRootIndex (uReceiverID)),
|
||||
false,
|
||||
false,
|
||||
saBalance,
|
||||
saReceiverLimit);
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ public:
|
||||
uint256 const & uIndex,
|
||||
SLE::ref sleAccount,
|
||||
const bool bAuth,
|
||||
const bool bNoRipple,
|
||||
const STAmount & saSrcBalance,
|
||||
const STAmount & saSrcLimit,
|
||||
const uint32 uSrcQualityIn = 0,
|
||||
|
||||
@@ -349,6 +349,7 @@ TER TrustSetTransactor::doApply ()
|
||||
Ledger::getRippleStateIndex (mTxnAccountID, uDstAccountID, uCurrencyID),
|
||||
mTxnAccount,
|
||||
bSetAuth,
|
||||
bSetNoRipple && !bClearNoRipple,
|
||||
saBalance,
|
||||
saLimitAllow, // Limit for who is being charged.
|
||||
uQualityIn,
|
||||
|
||||
Reference in New Issue
Block a user