From a122e176d75d2f5bf12557cf1d14a4325e1e88f7 Mon Sep 17 00:00:00 2001 From: David Schwartz Date: Wed, 6 Aug 2014 10:14:32 -0700 Subject: [PATCH] Pathfinding fixes: * Don't consider global freeze if not enforcing * Log if a covering path fails to cover --- src/ripple/module/app/paths/PathRequest.cpp | 7 ++++++- src/ripple/module/app/paths/Pathfinder.cpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ripple/module/app/paths/PathRequest.cpp b/src/ripple/module/app/paths/PathRequest.cpp index 2a6fed831..e16b83a24 100644 --- a/src/ripple/module/app/paths/PathRequest.cpp +++ b/src/ripple/module/app/paths/PathRequest.cpp @@ -467,7 +467,12 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) spsPaths.addPath(extraPath); rc.pathStateList_.clear (); resultCode = rc.rippleCalculate (); - m_journal.debug + if (resultCode != tesSUCCESS) + m_journal.warning + << iIdentifier << " Failed with covering path " + << transHuman (resultCode); + else + m_journal.debug << iIdentifier << " Extra path element gives " << transHuman (resultCode); } diff --git a/src/ripple/module/app/paths/Pathfinder.cpp b/src/ripple/module/app/paths/Pathfinder.cpp index bb934ee5f..ce0b712ab 100644 --- a/src/ripple/module/app/paths/Pathfinder.cpp +++ b/src/ripple/module/app/paths/Pathfinder.cpp @@ -505,7 +505,8 @@ int Pathfinder::getPathsOut ( int aFlags = sleAccount->getFieldU32(sfFlags); bool const bAuthRequired = (aFlags & lsfRequireAuth) != 0; - bool const bFrozen = (aFlags & lsfGlobalFreeze) != 0; + bool const bFrozen = ((aFlags & lsfGlobalFreeze) != 0) + && mLedger->enforceFreeze (); int count = 0;