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