From c522ffa6db2648f1d8a987843e7feabf1a0b7de8 Mon Sep 17 00:00:00 2001 From: Miguel Portilla Date: Mon, 24 Nov 2014 10:11:59 -0500 Subject: [PATCH] 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. --- src/ripple/app/transactors/Payment.cpp | 9 --------- src/ripple/protocol/TER.h | 1 - src/ripple/protocol/impl/TER.cpp | 1 - 3 files changed, 11 deletions(-) diff --git a/src/ripple/app/transactors/Payment.cpp b/src/ripple/app/transactors/Payment.cpp index a5e308435..e825b2013 100644 --- a/src/ripple/app/transactors/Payment.cpp +++ b/src/ripple/app/transactors/Payment.cpp @@ -132,15 +132,6 @@ public: 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) { // Consistent but redundant transaction. diff --git a/src/ripple/protocol/TER.h b/src/ripple/protocol/TER.h index 1407cfa1a..c64192509 100644 --- a/src/ripple/protocol/TER.h +++ b/src/ripple/protocol/TER.h @@ -79,7 +79,6 @@ enum TER // aka TransactionEngineResult temINVALID, temINVALID_FLAG, temREDUNDANT, - temREDUNDANT_SEND_MAX, temRIPPLE_EMPTY, temDISABLED, diff --git a/src/ripple/protocol/impl/TER.cpp b/src/ripple/protocol/impl/TER.cpp index 792b2a91c..3270322d0 100644 --- a/src/ripple/protocol/impl/TER.cpp +++ b/src/ripple/protocol/impl/TER.cpp @@ -116,7 +116,6 @@ bool transResultInfo (TER code, std::string& token, std::string& text) { temINVALID, "temINVALID", "The transaction is ill-formed." }, { temINVALID_FLAG, "temINVALID_FLAG", "The transaction has an invalid flag." }, { 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." }, { temUNCERTAIN, "temUNCERTAIN", "In process of determining result. Never returned." }, { temUNKNOWN, "temUNKNOWN", "The transaction requires logic that is not implemented yet." },