Don't include a non-XRP order book if we've already seen the issuer's account in the currency.

This commit is contained in:
JoelKatz
2013-09-08 13:41:55 -07:00
parent cb8ba44f62
commit fd6e0e788e

View File

@@ -683,8 +683,8 @@ void Pathfinder::addLink(
else
incompletePaths.addPath(newPath);
}
else
{
else if (!currentPath.hasSeen(book->getIssuerOut(), book->getCurrencyOut(), book->getIssuerOut()))
{ // Don't want the book if we've already seen the issuer
// add the order book itself
newPath.addElement(STPathElement(STPathElement::typeCurrency | STPathElement::typeIssuer,
ACCOUNT_XRP, book->getCurrencyOut(), book->getIssuerOut()));