From fd6e0e788e9187c7df1f65fda8a16a19f64b4b42 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 8 Sep 2013 13:41:55 -0700 Subject: [PATCH] Don't include a non-XRP order book if we've already seen the issuer's account in the currency. --- modules/ripple_app/paths/ripple_Pathfinder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ripple_app/paths/ripple_Pathfinder.cpp b/modules/ripple_app/paths/ripple_Pathfinder.cpp index 8e3d74f1f9..b2f9cc12cd 100644 --- a/modules/ripple_app/paths/ripple_Pathfinder.cpp +++ b/modules/ripple_app/paths/ripple_Pathfinder.cpp @@ -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()));