Stop finding paths when enough are found (RIPD-156)

This commit is contained in:
David Schwartz
2014-07-16 15:47:38 -07:00
committed by Vinnie Falco
parent 713c8efcbe
commit 0ce3aeb189
2 changed files with 3 additions and 1 deletions

View File

@@ -218,6 +218,8 @@ bool Pathfinder::findPaths (
if (costedPath.first <= iLevel)
{
getPaths(costedPath.second);
if (mCompletePaths.size () > PATHFINDER_MAX_COMPLETE_PATHS)
break;
}
}

View File

@@ -25,7 +25,7 @@ namespace ripple {
// VFALCO TODO Why 40? is the number 40 part of protocol?
const int CALC_NODE_DELIVER_MAX_LOOPS = 40;
const int NODE_ADVANCE_MAX_LOOPS = 100;
const int PATHFINDER_MAX_COMPLETE_PATHS = 1000;
} // ripple
#endif