Allow more deliver loops when multiquality

This commit is contained in:
JoelKatz
2015-09-09 09:50:57 -07:00
parent 6a55f99ede
commit b822d061ef
3 changed files with 10 additions and 3 deletions

View File

@@ -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;

View File

@@ -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";

View File

@@ -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;