Fix pathfinding with multiple issuers for one currency (RIPD-618).

* Allow pathfinding requests where the starting currency may have
  multiple issuers.

* Cache paths over all issuers to avoid repeating work.

* Clear the ledger checkpoint in one retry case.

* Add an additional node at the front of paths when the starting issuer
  is not the source account.
This commit is contained in:
Tom Ritchford
2014-10-27 14:45:58 -04:00
parent c2f2f83b7c
commit cf05f87795
7 changed files with 356 additions and 105 deletions

View File

@@ -125,7 +125,6 @@ static Json::Value signPayment(
&& params.isMember ("build_path"))
{
// Need a ripple path.
STPathSet spsPaths;
Currency uSrcCurrencyID;
Account uSrcIssuerID;
@@ -153,6 +152,7 @@ static Json::Value signPayment(
return rpcError (rpcTOO_BUSY);
auto cache = std::make_shared<RippleLineCache> (lSnapshot);
STPathSet spsPaths;
STPath fullLiquidityPath;
auto valid = findPathsForOneIssuer (
cache,