From b8fdb3b65934c84348540513a9d18a70a1546e4c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 4 Mar 2013 18:12:33 -0800 Subject: [PATCH] Cleanups. --- src/cpp/ripple/Pathfinder.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/cpp/ripple/Pathfinder.cpp b/src/cpp/ripple/Pathfinder.cpp index 8548081b16..1be85e3d4b 100644 --- a/src/cpp/ripple/Pathfinder.cpp +++ b/src/cpp/ripple/Pathfinder.cpp @@ -285,15 +285,18 @@ bool Pathfinder::findPaths(const unsigned int iMaxSteps, const unsigned int iMax continue; } - cLog(lsTRACE) << "findPaths: finish? account: " << (speEnd.mAccountID == mDstAccountID); - cLog(lsTRACE) << "findPaths: finish? currency: " << (speEnd.mCurrencyID == mDstAmount.getCurrency()); - cLog(lsTRACE) << "findPaths: finish? issuer: " - << RippleAddress::createHumanAccountID(speEnd.mIssuerID) - << " / " - << RippleAddress::createHumanAccountID(mDstAmount.getIssuer()) - << " / " - << RippleAddress::createHumanAccountID(mDstAccountID); - cLog(lsDEBUG) << "findPaths: finish? issuer is desired: " << (speEnd.mIssuerID == mDstAmount.getIssuer()); + if (tLog(lsTRACE) + { + cLog(lsTRACE) << "findPaths: finish? account: " << (speEnd.mAccountID == mDstAccountID); + cLog(lsTRACE) << "findPaths: finish? currency: " << (speEnd.mCurrencyID == mDstAmount.getCurrency()); + cLog(lsTRACE) << "findPaths: finish? issuer: " + << RippleAddress::createHumanAccountID(speEnd.mIssuerID) + << " / " + << RippleAddress::createHumanAccountID(mDstAmount.getIssuer()) + << " / " + << RippleAddress::createHumanAccountID(mDstAccountID); + cLog(lsTRACE) << "findPaths: finish? issuer is desired: " << (speEnd.mIssuerID == mDstAmount.getIssuer()); + } // YYY Allows going through self. Is this wanted? if (speEnd.mAccountID == mDstAccountID // Tail is destination account. @@ -343,7 +346,7 @@ bool Pathfinder::findPaths(const unsigned int iMaxSteps, const unsigned int iMax { // Path is at maximum size. Don't want to add more. - cLog(lsDEBUG) + cLog(lsTRACE) << boost::str(boost::format("findPaths: dropping: path would exceed max steps")); continue;