diff --git a/src/cpp/ripple/Pathfinder.cpp b/src/cpp/ripple/Pathfinder.cpp index 323d2d22e..0ffaba680 100644 --- a/src/cpp/ripple/Pathfinder.cpp +++ b/src/cpp/ripple/Pathfinder.cpp @@ -88,7 +88,7 @@ bool Pathfinder::bDefaultPath(const STPath& spPath) return false; // Didn't generate a default path. So can't match. } - PathState::pointer pspCurrent = boost::make_shared(mDstAmount, mSrcAmount, mLedger); + PathState::pointer pspCurrent = boost::make_shared(mDstAmount, mSrcAmount); if (pspCurrent) { @@ -163,7 +163,7 @@ Pathfinder::Pathfinder(Ledger::ref ledger, // Construct the default path for later comparison. - PathState::pointer psDefault = boost::make_shared(mDstAmount, mSrcAmount, mLedger); + PathState::pointer psDefault = boost::make_shared(mDstAmount, mSrcAmount); if (psDefault) { diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index bfe16e564..b4d3548f2 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -2676,7 +2676,7 @@ TER RippleCalc::rippleCalc( // Build a default path. Use saDstAmountReq and saMaxAmountReq to imply nodes. // XXX Might also make a XRP bridge by default. - PathState::pointer pspDirect = boost::make_shared(saDstAmountReq, saMaxAmountReq, lesActive.getLedgerRef()); + PathState::pointer pspDirect = boost::make_shared(saDstAmountReq, saMaxAmountReq); if (!pspDirect) return temUNKNOWN; @@ -2706,10 +2706,10 @@ cLog(lsDEBUG) << boost::str(boost::format("rippleCalc: Build direct: status: %s" cLog(lsTRACE) << "rippleCalc: Paths in set: " << spsPaths.size(); -int iIndex = 0; + int iIndex = 0; BOOST_FOREACH(const STPath& spPath, spsPaths) { - PathState::pointer pspExpanded = boost::make_shared(saDstAmountReq, saMaxAmountReq, lesActive.getLedgerRef()); + PathState::pointer pspExpanded = boost::make_shared(saDstAmountReq, saMaxAmountReq); if (!pspExpanded) return temUNKNOWN; diff --git a/src/cpp/ripple/RippleCalc.h b/src/cpp/ripple/RippleCalc.h index d1cdc9259..74b76770e 100644 --- a/src/cpp/ripple/RippleCalc.h +++ b/src/cpp/ripple/RippleCalc.h @@ -71,8 +71,6 @@ extern std::size_t hash_value(const aciSource& asValue); class PathState { protected: - Ledger::pointer mLedger; - TER pushNode(const int iType, const uint160& uAccountID, const uint160& uCurrencyID, const uint160& uIssuerID); TER pushImply(const uint160& uAccountID, const uint160& uCurrencyID, const uint160& uIssuerID); @@ -116,12 +114,11 @@ public: PathState( const STAmount& saSend, - const STAmount& saSendMax, - Ledger::pointer lrLedger = Ledger::pointer() - ) : mLedger(lrLedger), saInReq(saSendMax), saOutReq(saSend) { ; } + const STAmount& saSendMax + ) : saInReq(saSendMax), saOutReq(saSend) { ; } PathState(const PathState& psSrc, bool bUnused) - : mLedger(psSrc.mLedger), saInReq(psSrc.saInReq), saOutReq(psSrc.saOutReq) { ; } + : saInReq(psSrc.saInReq), saOutReq(psSrc.saOutReq) { ; } void setExpanded( const LedgerEntrySet& lesSource,