diff --git a/src/ripple/app/paths/Tuning.h b/src/ripple/app/paths/Tuning.h index cd5a8c6cb2..26cce973d7 100644 --- a/src/ripple/app/paths/Tuning.h +++ b/src/ripple/app/paths/Tuning.h @@ -22,7 +22,8 @@ namespace ripple { -int const CALC_NODE_DELIVER_MAX_LOOPS = 40; +int const CALC_NODE_DELIVER_MAX_LOOPS = 100; +int const CALC_NODE_DELIVER_MAX_LOOPS_MQ = 2000; int const NODE_ADVANCE_MAX_LOOPS = 100; int const PAYMENT_MAX_LOOPS = 1000; int const PATHFINDER_HIGH_PRIORITY = 100000; diff --git a/src/ripple/app/paths/cursor/DeliverNodeForward.cpp b/src/ripple/app/paths/cursor/DeliverNodeForward.cpp index a752bd3f68..9bc56e1fbd 100644 --- a/src/ripple/app/paths/cursor/DeliverNodeForward.cpp +++ b/src/ripple/app/paths/cursor/DeliverNodeForward.cpp @@ -53,7 +53,10 @@ TER PathCursor::deliverNodeForward ( while (resultCode == tesSUCCESS && saInAct + saInFees < saInReq) { // Did not spend all inbound deliver funds. - if (++loopCount > CALC_NODE_DELIVER_MAX_LOOPS) + if (++loopCount > + (multiQuality_ ? + CALC_NODE_DELIVER_MAX_LOOPS_MQ : + CALC_NODE_DELIVER_MAX_LOOPS)) { WriteLog (lsWARNING, RippleCalc) << "deliverNodeForward: max loops cndf"; diff --git a/src/ripple/app/paths/cursor/DeliverNodeReverse.cpp b/src/ripple/app/paths/cursor/DeliverNodeReverse.cpp index bdca1c6e0f..bbb963ac27 100644 --- a/src/ripple/app/paths/cursor/DeliverNodeReverse.cpp +++ b/src/ripple/app/paths/cursor/DeliverNodeReverse.cpp @@ -77,7 +77,10 @@ TER PathCursor::deliverNodeReverseImpl ( // While we did not deliver as much as requested: while (saOutAct < saOutReq) { - if (++loopCount > CALC_NODE_DELIVER_MAX_LOOPS) + if (++loopCount > + (multiQuality_ ? + CALC_NODE_DELIVER_MAX_LOOPS_MQ : + CALC_NODE_DELIVER_MAX_LOOPS)) { WriteLog (lsFATAL, RippleCalc) << "loop count exceeded"; return telFAILED_PROCESSING;