From 791b088ff310978a60c9fa296d1e42c3b7cedee3 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 5 Mar 2013 15:02:21 -0800 Subject: [PATCH] Make sure paths are correectly serializable. --- src/cpp/ripple/Pathfinder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/Pathfinder.cpp b/src/cpp/ripple/Pathfinder.cpp index ef14477a5..f9113952b 100644 --- a/src/cpp/ripple/Pathfinder.cpp +++ b/src/cpp/ripple/Pathfinder.cpp @@ -410,7 +410,7 @@ bool Pathfinder::findPaths(const unsigned int iMaxSteps, const unsigned int iMax BOOST_FOREACH(AccountItem::ref item, rippleLines.getItems()) { RippleState* rspEntry = (RippleState*) item.get(); - const uint160 uPeerID = rspEntry->getAccountIDPeer(); + const uint160& uPeerID = rspEntry->getAccountIDPeer(); if (spPath.hasSeen(uPeerID, speEnd.mCurrencyID, uPeerID)) { @@ -467,7 +467,8 @@ bool Pathfinder::findPaths(const unsigned int iMaxSteps, const unsigned int iMax { // A book we haven't seen before. Add it. STPath spNew(spPath); - STPathElement speBook(ACCOUNT_XRP, book->getCurrencyOut(), book->getIssuerOut()); + STPathElement speBook(ACCOUNT_XRP, book->getCurrencyOut(), book->getIssuerOut(), + book->getCurrencyIn() != book->getCurrencyOut()); spNew.mPath.push_back(speBook); // Add the order book.