mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Freeze flags: (RIPD-394)
* Define all flags * Set/clear bits in transactors * Frozen line counts towards reserve, is non-default * Report trust line state
This commit is contained in:
@@ -1367,6 +1367,7 @@ TER LedgerEntrySet::trustCreate (
|
||||
SLE::ref sleAccount, // --> the account being set.
|
||||
const bool bAuth, // --> authorize account.
|
||||
const bool bNoRipple, // --> others cannot ripple through
|
||||
const bool bFreeze, // --> funds cannot leave
|
||||
const STAmount& saBalance, // --> balance of account being set.
|
||||
// Issuer should be noAccount()
|
||||
const STAmount& saLimit, // --> limit for account being set.
|
||||
@@ -1435,6 +1436,10 @@ TER LedgerEntrySet::trustCreate (
|
||||
{
|
||||
uFlags |= (bSetHigh ? lsfHighNoRipple : lsfLowNoRipple);
|
||||
}
|
||||
if (bFreeze)
|
||||
{
|
||||
uFlags |= (!bSetHigh ? lsfLowFreeze : lsfHighFreeze);
|
||||
}
|
||||
|
||||
sleRippleState->setFieldU32 (sfFlags, uFlags);
|
||||
ownerCountAdjust (
|
||||
@@ -1536,6 +1541,7 @@ TER LedgerEntrySet::rippleCredit (
|
||||
entryCache (ltACCOUNT_ROOT, Ledger::getAccountRootIndex (uReceiverID)),
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
saBalance,
|
||||
saReceiverLimit);
|
||||
}
|
||||
@@ -1568,6 +1574,7 @@ TER LedgerEntrySet::rippleCredit (
|
||||
&& (uFlags & (!bSenderHigh ? lsfLowReserve : lsfHighReserve))
|
||||
// Sender reserve is set.
|
||||
&& !(uFlags & (!bSenderHigh ? lsfLowNoRipple : lsfHighNoRipple))
|
||||
&& !(uFlags & (!bSenderHigh ? lsfLowFreeze : lsfHighFreeze))
|
||||
&& !sleRippleState->getFieldAmount (
|
||||
!bSenderHigh ? sfLowLimit : sfHighLimit)
|
||||
// Sender trust limit is 0.
|
||||
|
||||
Reference in New Issue
Block a user