diff --git a/src/cpp/ripple/TransactionCheck.cpp b/src/cpp/ripple/TransactionCheck.cpp index 50b1a7f7c..433bd6960 100644 --- a/src/cpp/ripple/TransactionCheck.cpp +++ b/src/cpp/ripple/TransactionCheck.cpp @@ -7,5 +7,10 @@ bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction& txn, TransactionEngineParams params) { + +// 1) Make sure transaction changed account sequence number to correct value + +// 2) Make sure transaction didn't create XRP + return true; } diff --git a/src/cpp/ripple/TransactionEngine.cpp b/src/cpp/ripple/TransactionEngine.cpp index 1c0049fb2..1747f114d 100644 --- a/src/cpp/ripple/TransactionEngine.cpp +++ b/src/cpp/ripple/TransactionEngine.cpp @@ -176,12 +176,20 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa if (isSetBit(params, tapOPEN_LEDGER)) { if (!mLedger->addTransaction(txID, s)) + { + cLog(lsFATAL) << "Tried to add transaction to open ledger that already had it"; assert(false); + throw std::runtime_error("Duplicate transaction applied"); + } } else { if (!mLedger->addTransaction(txID, s, m)) - assert(false); + { + cLog(lsFATAL) << "Tried to add transaction to ledger that already had it"; + assert(false); + throw std::runtime_error("Duplicate transaction applied to closed ledger"); + } // Charge whatever fee they specified. STAmount saPaid = txn.getTransactionFee();