From c95dccfec61f869e7e6d4d1f144a77f7f78e6ceb Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 21 Jan 2014 09:05:44 -0500 Subject: [PATCH] Move PathRequests to separate files --- Builds/VisualStudio2012/RippleD.vcxproj | 7 + .../VisualStudio2012/RippleD.vcxproj.filters | 6 + src/ripple_app/paths/PathRequest.cpp | 222 ++---------------- src/ripple_app/paths/PathRequest.h | 72 +----- src/ripple_app/paths/PathRequests.cpp | 194 +++++++++++++++ src/ripple_app/paths/PathRequests.h | 74 ++++++ src/ripple_app/ripple_app.h | 1 + src/ripple_app/ripple_app_pt8.cpp | 1 + 8 files changed, 314 insertions(+), 263 deletions(-) create mode 100644 src/ripple_app/paths/PathRequests.cpp create mode 100644 src/ripple_app/paths/PathRequests.h diff --git a/Builds/VisualStudio2012/RippleD.vcxproj b/Builds/VisualStudio2012/RippleD.vcxproj index 1c8697aae5..95afb1de8e 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj +++ b/Builds/VisualStudio2012/RippleD.vcxproj @@ -1096,6 +1096,12 @@ true true + + true + true + true + true + true true @@ -2464,6 +2470,7 @@ + diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters index 83a6202470..f4919da436 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters @@ -1443,6 +1443,9 @@ [1] Ripple\rpc\impl + + [2] Old Ripple\ripple_app\paths + @@ -2928,6 +2931,9 @@ [1] Ripple\rpc\api + + [2] Old Ripple\ripple_app\paths + diff --git a/src/ripple_app/paths/PathRequest.cpp b/src/ripple_app/paths/PathRequest.cpp index 7bd8e7ca73..69377a3909 100644 --- a/src/ripple_app/paths/PathRequest.cpp +++ b/src/ripple_app/paths/PathRequest.cpp @@ -19,8 +19,11 @@ SETUP_LOG (PathRequest) -PathRequest::PathRequest (const boost::shared_ptr& subscriber, int id, PathRequests& owner) - : mLock (this, "PathRequest", __FILE__, __LINE__) +PathRequest::PathRequest ( +const boost::shared_ptr& subscriber, int id, PathRequests& owner, + Journal journal) + : m_journal (journal) + , mLock (this, "PathRequest", __FILE__, __LINE__) , mOwner (owner) , wpSubscriber (subscriber) , jvStatus (Json::objectValue) @@ -30,16 +33,11 @@ PathRequest::PathRequest (const boost::shared_ptr& subscriber, int id, , bLastSuccess (false) , iIdentifier (id) { - if (journal().debug) - journal().debug << iIdentifier << " created"; + if (m_journal.debug) + m_journal.debug << iIdentifier << " created"; ptCreated = boost::posix_time::microsec_clock::universal_time (); } -Journal& PathRequest::journal () -{ - return mOwner.journal (); -} - static std::string const get_milli_diff (boost::posix_time::ptime const& after, boost::posix_time::ptime const& before) { return lexicalCastThrow (static_cast ((after - before).total_milliseconds())); @@ -65,8 +63,8 @@ PathRequest::~PathRequest() full += get_milli_diff (ptFullReply, ptCreated); full += "ms"; } - if (journal().info) - journal().info << iIdentifier << " complete:" << fast << full << + if (m_journal.info) + m_journal.info << iIdentifier << " complete:" << fast << full << " total:" << get_milli_diff(ptCreated) << "ms"; } @@ -171,15 +169,15 @@ Json::Value PathRequest::doCreate (Ledger::ref lrLedger, RippleLineCache::ref& c status = jvStatus; } - if (journal().debug) + if (m_journal.debug) { if (bValid) { - journal().debug << iIdentifier << " valid: " << raSrcAccount.humanAccountID () << - journal().debug << iIdentifier << " Deliver: " << saDstAmount.getFullText (); + m_journal.debug << iIdentifier << " valid: " << raSrcAccount.humanAccountID () << + m_journal.debug << iIdentifier << " Deliver: " << saDstAmount.getFullText (); } else - journal().debug << iIdentifier << " invalid"; + m_journal.debug << iIdentifier << " invalid"; } valid = bValid; @@ -280,7 +278,7 @@ int PathRequest::parseJson (const Json::Value& jvParams, bool complete) } Json::Value PathRequest::doClose (const Json::Value&) { - journal().debug << iIdentifier << " closed"; + m_journal.debug << iIdentifier << " closed"; ScopedLockType sl (mLock, __FILE__, __LINE__); return jvStatus; } @@ -299,7 +297,7 @@ void PathRequest::resetLevel (int l) Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) { - journal().debug << iIdentifier << " update " << (fast ? "fast" : "normal"); + m_journal.debug << iIdentifier << " update " << (fast ? "fast" : "normal"); ScopedLockType sl (mLock, __FILE__, __LINE__); @@ -364,7 +362,7 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) --iLevel; } - journal().debug << iIdentifier << " processing at level " << iLevel; + m_journal.debug << iIdentifier << " processing at level " << iLevel; bool found = false; @@ -372,8 +370,8 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) { { STAmount test (currIssuer.first, currIssuer.second, 1); - if (journal().debug) - journal().debug << iIdentifier << " Trying to find paths: " << test.getFullText (); + if (m_journal.debug) + m_journal.debug << iIdentifier << " Trying to find paths: " << test.getFullText (); } bool valid; STPathSet& spsPaths = mContext[currIssuer]; @@ -392,7 +390,7 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) currIssuer.second.isNonZero () ? currIssuer.second : (currIssuer.first.isZero () ? ACCOUNT_XRP : raSrcAccount.getAccountID ()), 1); saMaxAmount.negate (); - journal().debug << iIdentifier << " Paths found, calling rippleCalc"; + m_journal.debug << iIdentifier << " Paths found, calling rippleCalc"; TER terResult = RippleCalc::rippleCalc (lesSandbox, saMaxAmountAct, saDstAmountAct, vpsExpanded, saMaxAmount, saDstAmount, raDstAccount.getAccountID (), raSrcAccount.getAccountID (), @@ -401,14 +399,14 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) if ((extraPath.size() > 0) && ((terResult == terNO_LINE) || (terResult == tecPATH_PARTIAL))) { - journal().debug << iIdentifier << " Trying with an extra path element"; + m_journal.debug << iIdentifier << " Trying with an extra path element"; spsPaths.addPath(extraPath); vpsExpanded.clear (); terResult = RippleCalc::rippleCalc (lesSandbox, saMaxAmountAct, saDstAmountAct, vpsExpanded, saMaxAmount, saDstAmount, raDstAccount.getAccountID (), raSrcAccount.getAccountID (), spsPaths, false, false, false, true); - journal().debug << iIdentifier << " Extra path element gives " << transHuman (terResult); + m_journal.debug << iIdentifier << " Extra path element gives " << transHuman (terResult); } if (terResult == tesSUCCESS) @@ -421,12 +419,12 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast) } else { - journal().debug << iIdentifier << " rippleCalc returns " << transHuman (terResult); + m_journal.debug << iIdentifier << " rippleCalc returns " << transHuman (terResult); } } else { - journal().debug << iIdentifier << " No paths found"; + m_journal.debug << iIdentifier << " No paths found"; } } @@ -453,177 +451,3 @@ InfoSub::pointer PathRequest::getSubscriber () return wpSubscriber.lock (); } -/** Get the current RippleLineCache, updating it if necessary. - Get the correct ledger to use. -*/ -RippleLineCache::pointer PathRequests::getLineCache (Ledger::pointer& ledger, bool authoritative) -{ - ScopedLockType sl (mLock, __FILE__, __LINE__); - - uint32 lineSeq = mLineCache ? mLineCache->getLedger()->getLedgerSeq() : 0; - uint32 lgrSeq = ledger->getLedgerSeq(); - - if ( (lineSeq == 0) || // no ledger - (authoritative && (lgrSeq > lineSeq)) || // newer authoritative ledger - (authoritative && ((lgrSeq + 8) < lineSeq)) || // we jumped way back for some reason - (lgrSeq > (lineSeq + 8))) // we jumped way forward for some reason - { - ledger = boost::make_shared(*ledger, false); // Take a snapshot of the ledger - mLineCache = boost::make_shared (ledger); - } - else - { - ledger = mLineCache->getLedger(); - } - return mLineCache; -} - -void PathRequests::updateAll (Ledger::ref inLedger, CancelCallback shouldCancel) -{ - std::vector requests; - - LoadEvent::autoptr event (getApp().getJobQueue().getLoadEventAP(jtPATH_FIND, "PathRequest::updateAll")); - - // Get the ledger and cache we should be using - Ledger::pointer ledger = inLedger; - RippleLineCache::pointer cache; - { - ScopedLockType sl (mLock, __FILE__, __LINE__); - requests = mRequests; - cache = getLineCache (ledger, true); - } - - bool newRequests = getApp().getLedgerMaster().isNewPathRequest(); - bool mustBreak = false; - - journal().trace << "updateAll seq=" << ledger->getLedgerSeq() << ", " << - requests.size() << " requests"; - int processed = 0, removed = 0; - - do - { - - { // Get the latest requests, cache, and ledger - ScopedLockType sl (mLock, __FILE__, __LINE__); - - if (mRequests.empty()) - return; - - // Newest request is last in mRequests, but we want to serve it first - requests.empty(); - requests.reserve (mRequests.size ()); - BOOST_REVERSE_FOREACH (PathRequest::wptr& req, mRequests) - { - requests.push_back (req); - } - - cache = getLineCache (ledger, false); - } - - BOOST_FOREACH (PathRequest::wref wRequest, requests) - { - if (shouldCancel()) - break; - - bool remove = true; - PathRequest::pointer pRequest = wRequest.lock (); - - if (pRequest) - { - if (!pRequest->needsUpdate (newRequests, ledger->getLedgerSeq ())) - remove = false; - else - { - InfoSub::pointer ipSub = pRequest->getSubscriber (); - if (ipSub) - { - Json::Value update = pRequest->doUpdate (cache, false); - update["type"] = "path_find"; - ipSub->send (update, false); - remove = false; - ++processed; - } - } - } - - if (remove) - { - PathRequest::pointer pRequest = wRequest.lock (); - - ScopedLockType sl (mLock, __FILE__, __LINE__); - - // Remove any dangling weak pointers or weak pointers that refer to this path request. - std::vector::iterator it = mRequests.begin(); - while (it != mRequests.end()) - { - PathRequest::pointer itRequest = it->lock (); - if (!itRequest || (itRequest == pRequest)) - { - ++removed; - it = mRequests.erase (it); - } - else - ++it; - } - } - - mustBreak = !newRequests && getApp().getLedgerMaster().isNewPathRequest(); - if (mustBreak) // We weren't handling new requests and then there was a new request - break; - - } - - if (mustBreak) - { // a new request came in while we were working - newRequests = true; - } - else if (newRequests) - { // we only did new requests, so we always need a last pass - newRequests = getApp().getLedgerMaster().isNewPathRequest(); - } - else - { // check if there are any new requests, otherwise we are done - newRequests = getApp().getLedgerMaster().isNewPathRequest(); - if (!newRequests) // We did a full pass and there are no new requests - return; - } - - } - while (!shouldCancel ()); - - journal().debug << "updateAll complete " << processed << " process and " << - removed << " removed"; -} - -Json::Value PathRequests::makePathRequest( - boost::shared_ptr const& subscriber, - const boost::shared_ptr& inLedger, - const Json::Value& requestJson) -{ - PathRequest::pointer req = boost::make_shared (subscriber, ++mLastIdentifier, *this); - - Ledger::pointer ledger = inLedger; - RippleLineCache::pointer cache; - - { - ScopedLockType sl (mLock, __FILE__, __LINE__); - cache = getLineCache (ledger, false); - } - - bool valid = false; - Json::Value result = req->doCreate (ledger, cache, requestJson, valid); - - if (valid) - { - { - ScopedLockType sl (mLock, __FILE__, __LINE__); - mRequests.push_back (req); - } - subscriber->setPathRequest (req); - getApp().getLedgerMaster().newPathRequest(); - } - return result; -} - - -// vim:ts=4 diff --git a/src/ripple_app/paths/PathRequest.h b/src/ripple_app/paths/PathRequest.h index 7cecf488ce..32cb20c760 100644 --- a/src/ripple_app/paths/PathRequest.h +++ b/src/ripple_app/paths/PathRequest.h @@ -31,10 +31,11 @@ class PathRequests; #define PFR_PJ_NOCHANGE 0 #define PFR_PJ_CHANGE 1 -class PathRequest : public boost::enable_shared_from_this, public CountedObject +class PathRequest : + public boost::enable_shared_from_this , + public CountedObject { public: - static char const* getCountedObjectName () { return "PathRequest"; } typedef boost::weak_ptr wptr; @@ -45,7 +46,9 @@ public: public: // VFALCO TODO Break the cyclic dependency on InfoSub - explicit PathRequest (boost::shared_ptr const& subscriber, int id, PathRequests&); + PathRequest (boost::shared_ptr const& subscriber, + int id, PathRequests&, Journal journal); + ~PathRequest (); bool isValid (const boost::shared_ptr&); @@ -59,13 +62,14 @@ public: Json::Value doStatus (const Json::Value&); Json::Value doUpdate (const boost::shared_ptr&, bool fast); // update jvStatus InfoSub::pointer getSubscriber (); - Journal& journal (); private: void setValid (); void resetLevel (int level); int parseJson (const Json::Value&, bool complete); + Journal m_journal; + typedef RippleRecursiveMutex LockType; typedef LockType::ScopedLockType ScopedLockType; LockType mLock; @@ -98,64 +102,4 @@ private: }; - -class PathRequests -{ -public: - - PathRequests (Journal journal, std::shared_ptr const& collector) - : mJournal (journal) - , mLastIdentifier (0) - , mLock ("PathRequests", __FILE__, __LINE__) - { - mFast = collector->make_event ("pathfind_fast"); - mFull = collector->make_event ("pathfind_full"); - } - - void updateAll (const boost::shared_ptr& ledger, CancelCallback shouldCancel); - - RippleLineCache::pointer getLineCache (Ledger::pointer& ledger, bool authoritative); - - Json::Value makePathRequest ( - boost::shared_ptr const& subscriber, - const boost::shared_ptr& ledger, - const Json::Value& request); - - Journal& journal () - { - return mJournal; - } - - void reportFast (int milliseconds) - { - mFast.notify (static_cast < insight::Event::value_type> (milliseconds)); - } - - void reportFull (int milliseconds) - { - mFull.notify (static_cast < insight::Event::value_type> (milliseconds)); - } - -private: - Journal mJournal; - - insight::Event mFast; - insight::Event mFull; - - // Track all requests - std::vector mRequests; - - // Use a RippleLineCache - RippleLineCache::pointer mLineCache; - - Atomic mLastIdentifier; - - typedef RippleRecursiveMutex LockType; - typedef LockType::ScopedLockType ScopedLockType; - LockType mLock; - -}; - #endif - -// vim:ts=4 diff --git a/src/ripple_app/paths/PathRequests.cpp b/src/ripple_app/paths/PathRequests.cpp new file mode 100644 index 0000000000..a03bb6673a --- /dev/null +++ b/src/ripple_app/paths/PathRequests.cpp @@ -0,0 +1,194 @@ +//------------------------------------------------------------------------------ +/* + This file is part of rippled: https://github.com/ripple/rippled + Copyright (c) 2012, 2013 Ripple Labs Inc. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ +//============================================================================== + +/** Get the current RippleLineCache, updating it if necessary. + Get the correct ledger to use. +*/ +RippleLineCache::pointer PathRequests::getLineCache (Ledger::pointer& ledger, bool authoritative) +{ + ScopedLockType sl (mLock, __FILE__, __LINE__); + + uint32 lineSeq = mLineCache ? mLineCache->getLedger()->getLedgerSeq() : 0; + uint32 lgrSeq = ledger->getLedgerSeq(); + + if ( (lineSeq == 0) || // no ledger + (authoritative && (lgrSeq > lineSeq)) || // newer authoritative ledger + (authoritative && ((lgrSeq + 8) < lineSeq)) || // we jumped way back for some reason + (lgrSeq > (lineSeq + 8))) // we jumped way forward for some reason + { + ledger = boost::make_shared(*ledger, false); // Take a snapshot of the ledger + mLineCache = boost::make_shared (ledger); + } + else + { + ledger = mLineCache->getLedger(); + } + return mLineCache; +} + +void PathRequests::updateAll (Ledger::ref inLedger, CancelCallback shouldCancel) +{ + std::vector requests; + + LoadEvent::autoptr event (getApp().getJobQueue().getLoadEventAP(jtPATH_FIND, "PathRequest::updateAll")); + + // Get the ledger and cache we should be using + Ledger::pointer ledger = inLedger; + RippleLineCache::pointer cache; + { + ScopedLockType sl (mLock, __FILE__, __LINE__); + requests = mRequests; + cache = getLineCache (ledger, true); + } + + bool newRequests = getApp().getLedgerMaster().isNewPathRequest(); + bool mustBreak = false; + + mJournal.trace << "updateAll seq=" << ledger->getLedgerSeq() << ", " << + requests.size() << " requests"; + int processed = 0, removed = 0; + + do + { + + { // Get the latest requests, cache, and ledger + ScopedLockType sl (mLock, __FILE__, __LINE__); + + if (mRequests.empty()) + return; + + // Newest request is last in mRequests, but we want to serve it first + requests.empty(); + requests.reserve (mRequests.size ()); + BOOST_REVERSE_FOREACH (PathRequest::wptr& req, mRequests) + { + requests.push_back (req); + } + + cache = getLineCache (ledger, false); + } + + BOOST_FOREACH (PathRequest::wref wRequest, requests) + { + if (shouldCancel()) + break; + + bool remove = true; + PathRequest::pointer pRequest = wRequest.lock (); + + if (pRequest) + { + if (!pRequest->needsUpdate (newRequests, ledger->getLedgerSeq ())) + remove = false; + else + { + InfoSub::pointer ipSub = pRequest->getSubscriber (); + if (ipSub) + { + Json::Value update = pRequest->doUpdate (cache, false); + update["type"] = "path_find"; + ipSub->send (update, false); + remove = false; + ++processed; + } + } + } + + if (remove) + { + PathRequest::pointer pRequest = wRequest.lock (); + + ScopedLockType sl (mLock, __FILE__, __LINE__); + + // Remove any dangling weak pointers or weak pointers that refer to this path request. + std::vector::iterator it = mRequests.begin(); + while (it != mRequests.end()) + { + PathRequest::pointer itRequest = it->lock (); + if (!itRequest || (itRequest == pRequest)) + { + ++removed; + it = mRequests.erase (it); + } + else + ++it; + } + } + + mustBreak = !newRequests && getApp().getLedgerMaster().isNewPathRequest(); + if (mustBreak) // We weren't handling new requests and then there was a new request + break; + + } + + if (mustBreak) + { // a new request came in while we were working + newRequests = true; + } + else if (newRequests) + { // we only did new requests, so we always need a last pass + newRequests = getApp().getLedgerMaster().isNewPathRequest(); + } + else + { // check if there are any new requests, otherwise we are done + newRequests = getApp().getLedgerMaster().isNewPathRequest(); + if (!newRequests) // We did a full pass and there are no new requests + return; + } + + } + while (!shouldCancel ()); + + mJournal.debug << "updateAll complete " << processed << " process and " << + removed << " removed"; +} + +Json::Value PathRequests::makePathRequest( + boost::shared_ptr const& subscriber, + const boost::shared_ptr& inLedger, + const Json::Value& requestJson) +{ + PathRequest::pointer req = boost::make_shared ( + subscriber, ++mLastIdentifier, *this, mJournal); + + Ledger::pointer ledger = inLedger; + RippleLineCache::pointer cache; + + { + ScopedLockType sl (mLock, __FILE__, __LINE__); + cache = getLineCache (ledger, false); + } + + bool valid = false; + Json::Value result = req->doCreate (ledger, cache, requestJson, valid); + + if (valid) + { + { + ScopedLockType sl (mLock, __FILE__, __LINE__); + mRequests.push_back (req); + } + subscriber->setPathRequest (req); + getApp().getLedgerMaster().newPathRequest(); + } + return result; +} + + +// vim:ts=4 diff --git a/src/ripple_app/paths/PathRequests.h b/src/ripple_app/paths/PathRequests.h new file mode 100644 index 0000000000..473ae54bb8 --- /dev/null +++ b/src/ripple_app/paths/PathRequests.h @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +/* + This file is part of rippled: https://github.com/ripple/rippled + Copyright (c) 2012, 2013 Ripple Labs Inc. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ +//============================================================================== + +#ifndef RIPPLE_PATHREQUESTS_H +#define RIPPLE_PATHREQUESTS_H + +class PathRequests +{ +public: + PathRequests (Journal journal, insight::Collector::ptr const& collector) + : mJournal (journal) + , mLastIdentifier (0) + , mLock ("PathRequests", __FILE__, __LINE__) + { + mFast = collector->make_event ("pathfind_fast"); + mFull = collector->make_event ("pathfind_full"); + } + + void updateAll (const boost::shared_ptr& ledger, CancelCallback shouldCancel); + + RippleLineCache::pointer getLineCache (Ledger::pointer& ledger, bool authoritative); + + Json::Value makePathRequest ( + boost::shared_ptr const& subscriber, + const boost::shared_ptr& ledger, + const Json::Value& request); + + void reportFast (int milliseconds) + { + mFast.notify (static_cast < insight::Event::value_type> (milliseconds)); + } + + void reportFull (int milliseconds) + { + mFull.notify (static_cast < insight::Event::value_type> (milliseconds)); + } + +private: + Journal mJournal; + + insight::Event mFast; + insight::Event mFull; + + // Track all requests + std::vector mRequests; + + // Use a RippleLineCache + RippleLineCache::pointer mLineCache; + + Atomic mLastIdentifier; + + typedef RippleRecursiveMutex LockType; + typedef LockType::ScopedLockType ScopedLockType; + LockType mLock; + +}; + +#endif diff --git a/src/ripple_app/ripple_app.h b/src/ripple_app/ripple_app.h index 257ba0e081..f40630e82c 100644 --- a/src/ripple_app/ripple_app.h +++ b/src/ripple_app/ripple_app.h @@ -134,6 +134,7 @@ namespace ripple { #include "tx/OfferCreateTransactor.h" #include "paths/RippleLineCache.h" #include "paths/PathRequest.h" +#include "paths/PathRequests.h" #include "main/ParameterTable.h" #include "paths/RippleLineCache.h" #include "paths/PathState.h" diff --git a/src/ripple_app/ripple_app_pt8.cpp b/src/ripple_app/ripple_app_pt8.cpp index 42814d546a..d3484c2b92 100644 --- a/src/ripple_app/ripple_app_pt8.cpp +++ b/src/ripple_app/ripple_app_pt8.cpp @@ -32,6 +32,7 @@ namespace ripple { #include "paths/PathRequest.cpp" +#include "paths/PathRequests.cpp" #include "paths/RippleCalc.cpp" #include "paths/PathState.cpp"