mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 04:25:51 +00:00
Just charge fee when unable to meet reserve.
This commit is contained in:
@@ -143,8 +143,7 @@ TER PaymentTransactor::doApply()
|
|||||||
const uint64 uReserve = mEngine->getLedger()->getReserve(uOwnerCount);
|
const uint64 uReserve = mEngine->getLedger()->getReserve(uOwnerCount);
|
||||||
|
|
||||||
// Make sure have enough reserve to send.
|
// Make sure have enough reserve to send.
|
||||||
if (isSetBit(mParams, tapOPEN_LEDGER) // Ledger is not final, we can vote.
|
if (saSrcXRPBalance < saDstAmount + uReserve) // Reserve is not scaled by fee.
|
||||||
&& saSrcXRPBalance < saDstAmount + uReserve) // Reserve is not scaled by fee.
|
|
||||||
{
|
{
|
||||||
// Vote no. However, transaction might succeed, if applied in a different order.
|
// Vote no. However, transaction might succeed, if applied in a different order.
|
||||||
cLog(lsINFO) << "";
|
cLog(lsINFO) << "";
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ TER Transactor::payFee()
|
|||||||
return telINSUF_FEE_P;
|
return telINSUF_FEE_P;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !saPaid ) return tesSUCCESS;
|
if (!saPaid) return tesSUCCESS;
|
||||||
|
|
||||||
// Deduct the fee, so it's not available during the transaction.
|
// Deduct the fee, so it's not available during the transaction.
|
||||||
// Will only write the account back, if the transaction succeeds.
|
// Will only write the account back, if the transaction succeeds.
|
||||||
|
|||||||
@@ -235,7 +235,6 @@ TER TrustSetTransactor::doApply()
|
|||||||
cLog(lsINFO) << "doTrustSet: Deleting ripple line";
|
cLog(lsINFO) << "doTrustSet: Deleting ripple line";
|
||||||
}
|
}
|
||||||
else if (bReserveIncrease
|
else if (bReserveIncrease
|
||||||
&& isSetBit(mParams, tapOPEN_LEDGER) // Ledger is not final, we can vote no.
|
|
||||||
&& saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load.
|
&& saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load.
|
||||||
{
|
{
|
||||||
cLog(lsINFO) << "doTrustSet: Delay transaction: Insufficent reserve to add trust line.";
|
cLog(lsINFO) << "doTrustSet: Delay transaction: Insufficent reserve to add trust line.";
|
||||||
@@ -259,8 +258,7 @@ TER TrustSetTransactor::doApply()
|
|||||||
|
|
||||||
return tecNO_LINE_REDUNDANT;
|
return tecNO_LINE_REDUNDANT;
|
||||||
}
|
}
|
||||||
else if (isSetBit(mParams, tapOPEN_LEDGER) // Ledger is not final, we can vote no.
|
else if (saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load.
|
||||||
&& saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load.
|
|
||||||
{
|
{
|
||||||
cLog(lsINFO) << "doTrustSet: Delay transaction: Line does not exist. Insufficent reserve to create line.";
|
cLog(lsINFO) << "doTrustSet: Delay transaction: Line does not exist. Insufficent reserve to create line.";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user