From 9b937c10d3abc77639331768e55f5378b3e71c0e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 6 May 2013 21:00:59 -0700 Subject: [PATCH 1/6] Backout two changes not ready for prime time. --- src/cpp/ripple/Config.h | 2 +- src/cpp/ripple/TransactionCheck.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/ripple/Config.h b/src/cpp/ripple/Config.h index eb47e2e2c0..83a8520025 100644 --- a/src/cpp/ripple/Config.h +++ b/src/cpp/ripple/Config.h @@ -51,7 +51,7 @@ const int SYSTEM_WEBSOCKET_PUBLIC_PORT = 6563; // XXX Going away. #define DEFAULT_PEER_CONNECT_LOW_WATER 4 // Grows exponentially worse. -#define DEFAULT_PATH_SEARCH_SIZE 5 +#define DEFAULT_PATH_SEARCH_SIZE 4 enum SizedItemName { diff --git a/src/cpp/ripple/TransactionCheck.cpp b/src/cpp/ripple/TransactionCheck.cpp index 05431b6a95..9e43553207 100644 --- a/src/cpp/ripple/TransactionCheck.cpp +++ b/src/cpp/ripple/TransactionCheck.cpp @@ -8,6 +8,7 @@ SETUP_LOG(); bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction& txn, TransactionEngineParams params) { +#if 0 const RippleAddress& srcAccount = txn.getFieldAccount(sfAccount); uint32 txnSeq = txn.getFieldU32(sfSequence); @@ -65,6 +66,7 @@ bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction& assert(false); return tefINTERNAL; } +#endif return true; } From c2fae08064df076b7e1058c3a020137c0d447ac0 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 6 May 2013 21:01:26 -0700 Subject: [PATCH 2/6] Bump version. --- src/cpp/ripple/Version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/Version.h b/src/cpp/ripple/Version.h index 930c0b9dbf..49632b6c6b 100644 --- a/src/cpp/ripple/Version.h +++ b/src/cpp/ripple/Version.h @@ -5,8 +5,8 @@ // #define SERVER_VERSION_MAJOR 0 -#define SERVER_VERSION_MINOR 8 -#define SERVER_VERSION_SUB "-c" +#define SERVER_VERSION_MINOR 9 +#define SERVER_VERSION_SUB "-a" #define SERVER_NAME "Ripple" #define SV_STRINGIZE(x) SV_STRINGIZE2(x) From c0265ac4d3d1c003b2851095c023997f637bedf4 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 6 May 2013 22:49:34 -0700 Subject: [PATCH 3/6] Hotfix. --- src/cpp/ripple/RippleCalc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index 07772686ee..b6b572805c 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -961,6 +961,7 @@ TER RippleCalc::calcNodeAdvance( else if (!bReverse) { cLog(lsWARNING) << boost::str(boost::format("calcNodeAdvance: unreachable: ran out of offers")); + return mOpenLedger ? telFAILED_PROCESSING : tecFAILED_PROCESSING; // TEMPORARY assert(false); // Can't run out of offers in forward direction. terResult = tefEXCEPTION; } From 393d34f823e30bbba62dcba14480150453962cf5 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 7 May 2013 07:07:36 -0700 Subject: [PATCH 4/6] Emergency fix. --- src/cpp/ripple/RippleCalc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index b6b572805c..4e2e66bce2 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -912,6 +912,7 @@ TER RippleCalc::calcNodeAdvance( { // No more offers. Should be done rather than fall off end of book. cLog(lsWARNING) << "calcNodeAdvance: Unreachable: Fell off end of order book."; + return mOpenLedger ? telFAILED_PROCESSING : tecFAILED_PROCESSING; // FIXME assert(false); terResult = tefEXCEPTION; From dae76518124dee84c53b5ce386a77a8210609a5f Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 7 May 2013 14:18:17 -0700 Subject: [PATCH 5/6] Temporary fix. --- src/cpp/ripple/RippleCalc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index 4e2e66bce2..8d0a7df444 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -2959,10 +2959,11 @@ int iPass = 0; } else if (saDstAmountAct > saDstAmountReq) { - cLog(lsWARNING) << boost::str(boost::format("rippleCalc: TOO MUCH: saDstAmountAct=%s saDstAmountReq=%s") + cLog(lsFATAL) << boost::str(boost::format("rippleCalc: TOO MUCH: saDstAmountAct=%s saDstAmountReq=%s") % saDstAmountAct % saDstAmountReq); + return tefEXCEPTION; // TEMPORARY assert(false); } else if (saMaxAmountAct != saMaxAmountReq && iDry != vpsExpanded.size()) From cb87bfd4b4352d781f54c60548bb5122c7cdfb98 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Tue, 7 May 2013 15:38:30 -0700 Subject: [PATCH 6/6] Zero to do on each ripple pass. --- src/cpp/ripple/RippleCalc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index 8d0a7df444..9be60945a5 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -2667,6 +2667,16 @@ void RippleCalc::pathNext(PathState::ref psrCur, const bool bMultiQuality, const lesCurrent = lesCheckpoint.duplicate(); // Restore from checkpoint. + for (unsigned int uIndex = psrCur->vpnNodes.size(); uIndex--;) + { + PaymentNode& pnCur = psrCur->vpnNodes[uIndex]; + + pnCur.saRevRedeem.zero(); + pnCur.saRevIssue.zero(); + pnCur.saRevDeliver.zero(); + pnCur.saFwdDeliver.zero(); + } + psrCur->terStatus = calcNodeRev(uLast, *psrCur, bMultiQuality); cLog(lsDEBUG) << "pathNext: Path after reverse: " << psrCur->getJson();