Add support for multiple path finding and path length limiting.

This commit is contained in:
Arthur Britto
2012-12-11 15:31:55 -08:00
parent 154f4bc980
commit eac6fe88c1
3 changed files with 108 additions and 61 deletions

View File

@@ -765,7 +765,7 @@ Json::Value RPCHandler::doRipplePathFind(Json::Value jvRequest)
STPathSet spsComputed;
Pathfinder pf(raSrc, raDst, uSrcCurrencyID, uSrcIssuerID, saDstAmount);
if (!pf.findPaths(5, 1, spsComputed))
if (!pf.findPaths(5, 3, spsComputed))
{
cLog(lsDEBUG) << "ripple_path_find: No paths found.";
}
@@ -958,7 +958,7 @@ Json::Value RPCHandler::doSubmit(Json::Value jvRequest)
Pathfinder pf(raSrcAddressID, dstAccountID, saSendMax.getCurrency(), saSendMax.getIssuer(), saSend);
if (!pf.findPaths(5, 1, spsPaths))
if (!pf.findPaths(5, 3, spsPaths))
{
cLog(lsDEBUG) << "payment: build_path: No paths found.";