diff --git a/src/ripple/module/app/paths/Pathfinder.cpp b/src/ripple/module/app/paths/Pathfinder.cpp index 45e1ba784..2d7d07d67 100644 --- a/src/ripple/module/app/paths/Pathfinder.cpp +++ b/src/ripple/module/app/paths/Pathfinder.cpp @@ -490,16 +490,17 @@ int Pathfinder::getPathsOut ( Currency const& currencyID, Account const& accountID, bool isDstCurrency, Account const& dstAccount) { - auto currencyAccount = std::make_pair(currencyID, accountID); - auto it = mPOMap.find (currencyAccount); + Issue issue (currencyID, accountID); + auto it = mPathsOutCountMap.find (issue); - if (it != mPOMap.end ()) + if (it != mPathsOutCountMap.end ()) return it->second; - auto sleAccount = mLedger->getSLEi(Ledger::getAccountRootIndex(accountID)); + auto sleAccount = mLedger->getSLEi ( + Ledger::getAccountRootIndex (accountID)); if (!sleAccount) { - mPOMap[currencyAccount] = 0; + mPathsOutCountMap[issue] = 0; return 0; } @@ -541,7 +542,7 @@ int Pathfinder::getPathsOut ( ++count; } } - mPOMap[currencyAccount] = count; + mPathsOutCountMap[issue] = count; return count; } diff --git a/src/ripple/module/app/paths/Pathfinder.h b/src/ripple/module/app/paths/Pathfinder.h index 35b829586..e98ab4a91 100644 --- a/src/ripple/module/app/paths/Pathfinder.h +++ b/src/ripple/module/app/paths/Pathfinder.h @@ -133,11 +133,11 @@ private: LoadEvent::pointer m_loadEvent; RippleLineCache::pointer mRLCache; - STPathElement mSource; - STPathSet mCompletePaths; + STPathElement mSource; + STPathSet mCompletePaths; std::map mPaths; - hash_map, int> mPOMap; + hash_map mPathsOutCountMap; // Add ripple paths static std::uint32_t const afADD_ACCOUNTS = 0x001;