mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Eliminate temREDUNDANT_SEND_MAX (RIPD-590):
The rules for when a SendMax is redundant are complicated. It is easier to always allow a SendMax and eliminate temREDUNDANT_SEND_MAX.
This commit is contained in:
committed by
Nik Bougalis
parent
93b7599b1c
commit
c522ffa6db
@@ -132,15 +132,6 @@ public:
|
|||||||
|
|
||||||
return temREDUNDANT;
|
return temREDUNDANT;
|
||||||
}
|
}
|
||||||
else if (bMax && maxSourceAmount == saDstAmount &&
|
|
||||||
maxSourceAmount.getCurrency () == saDstAmount.getCurrency ())
|
|
||||||
{
|
|
||||||
// Consistent but redundant transaction.
|
|
||||||
m_journal.trace <<
|
|
||||||
"Malformed transaction: Redundant SendMax.";
|
|
||||||
|
|
||||||
return temREDUNDANT_SEND_MAX;
|
|
||||||
}
|
|
||||||
else if (bXRPDirect && bMax)
|
else if (bXRPDirect && bMax)
|
||||||
{
|
{
|
||||||
// Consistent but redundant transaction.
|
// Consistent but redundant transaction.
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ enum TER // aka TransactionEngineResult
|
|||||||
temINVALID,
|
temINVALID,
|
||||||
temINVALID_FLAG,
|
temINVALID_FLAG,
|
||||||
temREDUNDANT,
|
temREDUNDANT,
|
||||||
temREDUNDANT_SEND_MAX,
|
|
||||||
temRIPPLE_EMPTY,
|
temRIPPLE_EMPTY,
|
||||||
temDISABLED,
|
temDISABLED,
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ bool transResultInfo (TER code, std::string& token, std::string& text)
|
|||||||
{ temINVALID, "temINVALID", "The transaction is ill-formed." },
|
{ temINVALID, "temINVALID", "The transaction is ill-formed." },
|
||||||
{ temINVALID_FLAG, "temINVALID_FLAG", "The transaction has an invalid flag." },
|
{ temINVALID_FLAG, "temINVALID_FLAG", "The transaction has an invalid flag." },
|
||||||
{ temREDUNDANT, "temREDUNDANT", "Sends same currency to self." },
|
{ temREDUNDANT, "temREDUNDANT", "Sends same currency to self." },
|
||||||
{ temREDUNDANT_SEND_MAX, "temREDUNDANT_SEND_MAX", "Send max is redundant." },
|
|
||||||
{ temRIPPLE_EMPTY, "temRIPPLE_EMPTY", "PathSet with no paths." },
|
{ temRIPPLE_EMPTY, "temRIPPLE_EMPTY", "PathSet with no paths." },
|
||||||
{ temUNCERTAIN, "temUNCERTAIN", "In process of determining result. Never returned." },
|
{ temUNCERTAIN, "temUNCERTAIN", "In process of determining result. Never returned." },
|
||||||
{ temUNKNOWN, "temUNKNOWN", "The transaction requires logic that is not implemented yet." },
|
{ temUNKNOWN, "temUNKNOWN", "The transaction requires logic that is not implemented yet." },
|
||||||
|
|||||||
Reference in New Issue
Block a user