diff --git a/src/cpp/ripple/AccountSetTransactor.cpp b/src/cpp/ripple/AccountSetTransactor.cpp index 7808dcdb64..88c48b2469 100644 --- a/src/cpp/ripple/AccountSetTransactor.cpp +++ b/src/cpp/ripple/AccountSetTransactor.cpp @@ -8,21 +8,16 @@ TER AccountSetTransactor::doApply() const uint32 uTxFlags = mTxn.getFlags(); -#if ENABLE_REQUIRE_DEST_TAG const uint32 uFlagsIn = mTxnAccount->getFieldU32(sfFlags); uint32 uFlagsOut = uFlagsIn; if (uTxFlags & tfAccountSetMask) -#else - if (uTxFlags) -#endif { cLog(lsINFO) << "AccountSet: Malformed transaction: Invalid flags set."; return temINVALID_FLAG; } -#if ENABLE_REQUIRE_DEST_TAG // // RequireDestTag // @@ -50,7 +45,6 @@ TER AccountSetTransactor::doApply() if (uFlagsIn != uFlagsOut) mTxnAccount->setFieldU32(sfFlags, uFlagsOut); -#endif // // EmailHash diff --git a/src/cpp/ripple/LedgerFormats.h b/src/cpp/ripple/LedgerFormats.h index 4c2ba9c54d..7e575650ff 100644 --- a/src/cpp/ripple/LedgerFormats.h +++ b/src/cpp/ripple/LedgerFormats.h @@ -3,8 +3,6 @@ #include "SerializedObject.h" -#define ENABLE_REQUIRE_DEST_TAG 0 - // Used as the type of a transaction or the type of a ledger entry. enum LedgerEntryType { @@ -42,9 +40,7 @@ enum LedgerSpecificFlags { // ltACCOUNT_ROOT lsfPasswordSpent = 0x00010000, // True, if password set fee is spent. -#if ENABLE_REQUIRE_DEST_TAG lsfRequireDestTag = 0x00020000, // True, to require a DestinationTag for payments. -#endif // ltOFFER lsfPassive = 0x00010000, diff --git a/src/cpp/ripple/PaymentTransactor.cpp b/src/cpp/ripple/PaymentTransactor.cpp index 51dd346495..ac4a7a42c0 100644 --- a/src/cpp/ripple/PaymentTransactor.cpp +++ b/src/cpp/ripple/PaymentTransactor.cpp @@ -99,14 +99,12 @@ TER PaymentTransactor::doApply() sleDst->setFieldAccount(sfAccount, uDstAccountID); sleDst->setFieldU32(sfSequence, 1); } -#if ENABLE_REQUIRE_DEST_TAG else if ((sleDst->getFlags() & lsfRequireDestTag) && !mTxn.isFieldPresent(sfDestinationTag)) { cLog(lsINFO) << "Payment: Malformed transaction: DestinationTag required."; return temINVALID; } -#endif else { mEngine->entryModify(sleDst); diff --git a/src/cpp/ripple/SerializeProto.h b/src/cpp/ripple/SerializeProto.h index fc6ee038a6..a36debe660 100644 --- a/src/cpp/ripple/SerializeProto.h +++ b/src/cpp/ripple/SerializeProto.h @@ -1,8 +1,6 @@ // This is not really a header file, but it can be used as one with // appropriate #define statements. -#define ENABLE_DESTINATION_TAG 0 - // types (common) TYPE(Int16, UINT16, 1) TYPE(Int32, UINT32, 2) @@ -46,9 +44,7 @@ FIELD(TransferRate, UINT32, 11) FIELD(WalletSize, UINT32, 12) FIELD(OwnerCount, UINT32, 13) -#if ENABLE_DESTINATION_TAG FIELD(DestinationTag, UINT32, 14) -#endif // 32-bit integers (uncommon) FIELD(HighQualityIn, UINT32, 16) diff --git a/src/cpp/ripple/TransactionErr.cpp b/src/cpp/ripple/TransactionErr.cpp index b02b2c50ce..5b8020ad3d 100644 --- a/src/cpp/ripple/TransactionErr.cpp +++ b/src/cpp/ripple/TransactionErr.cpp @@ -53,9 +53,7 @@ bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman) { temBAD_SEQUENCE, "temBAD_SEQUENCE", "Malformed: Sequence is not in the past." }, { temDST_IS_SRC, "temDST_IS_SRC", "Destination may not be source." }, { temDST_NEEDED, "temDST_NEEDED", "Destination not specified." }, -#if ENABLE_REQUIRE_DEST_TAG { temDST_TAG_NEEDED, "temDST_TAG_NEEDED", "Destination tag required." }, -#endif { temINVALID, "temINVALID", "The transaction is ill-formed." }, { temINVALID_FLAG, "temINVALID_FLAG", "The transaction has an invalid flag." }, { temREDUNDANT, "temREDUNDANT", "Sends same currency to self." }, diff --git a/src/cpp/ripple/TransactionErr.h b/src/cpp/ripple/TransactionErr.h index 676a84142b..9de5fe065e 100644 --- a/src/cpp/ripple/TransactionErr.h +++ b/src/cpp/ripple/TransactionErr.h @@ -39,9 +39,7 @@ enum TER // aka TransactionEngineResult temBAD_SEQUENCE, temDST_IS_SRC, temDST_NEEDED, -#if ENABLE_REQUIRE_DEST_TAG temDST_TAG_NEEDED, -#endif temINVALID, temINVALID_FLAG, temREDUNDANT, diff --git a/src/cpp/ripple/TransactionFormats.cpp b/src/cpp/ripple/TransactionFormats.cpp index 18c782ad92..effb983698 100644 --- a/src/cpp/ripple/TransactionFormats.cpp +++ b/src/cpp/ripple/TransactionFormats.cpp @@ -55,9 +55,7 @@ static bool TFInit() << SOElement(sfSendMax, SOE_OPTIONAL) << SOElement(sfPaths, SOE_DEFAULT) << SOElement(sfInvoiceID, SOE_OPTIONAL) -#if ENABLE_DESTINATION_TAG << SOElement(sfDestinationTag, SOE_OPTIONAL) -#endif ; DECLARE_TF(Contract, ttCONTRACT) diff --git a/src/cpp/ripple/TransactionFormats.h b/src/cpp/ripple/TransactionFormats.h index ad804ccb9b..f761c5c70a 100644 --- a/src/cpp/ripple/TransactionFormats.h +++ b/src/cpp/ripple/TransactionFormats.h @@ -59,12 +59,10 @@ const int TransactionMaxLen = 1048576; // Transaction flags. // -#if ENABLE_REQUIRE_DEST_TAG // AccountSet flags: const uint32 tfRequireDestTag = 0x00010000; const uint32 tfOptionalDestTag = 0x00020000; const uint32 tfAccountSetMask = ~(tfRequireDestTag|tfOptionalDestTag); -#endif // OfferCreate flags: const uint32 tfPassive = 0x00010000;