diff --git a/src/ripple/common/TaggedCache.h b/src/ripple/common/TaggedCache.h index f25e11579..bb725ab87 100644 --- a/src/ripple/common/TaggedCache.h +++ b/src/ripple/common/TaggedCache.h @@ -301,7 +301,9 @@ public: if (cit == m_cache.end ()) { - m_cache.insert (cache_pair (key, Entry (m_clock.now(), data))); + m_cache.emplace (std::piecewise_construct, + std::forward_as_tuple(key), + std::forward_as_tuple(m_clock.now(), data)); ++m_cache_count; return false; } @@ -526,7 +528,6 @@ private: void touch (clock_type::time_point const& now) { last_access = now; } }; - typedef std::pair cache_pair; typedef hardened_hash_map cache_type; typedef typename cache_type::iterator cache_iterator; diff --git a/src/ripple/module/app/ledger/Ledger.cpp b/src/ripple/module/app/ledger/Ledger.cpp index a6b729d2d..6792a0714 100644 --- a/src/ripple/module/app/ledger/Ledger.cpp +++ b/src/ripple/module/app/ledger/Ledger.cpp @@ -24,10 +24,6 @@ namespace ripple { -LedgerBase::LedgerBase () -{ -} - Ledger::Ledger (const RippleAddress& masterID, std::uint64_t startAmount) : mTotCoins (startAmount) , mLedgerSeq (1) // First Ledger @@ -1162,8 +1158,6 @@ Json::Value Ledger::getJson (int options) bool const bFull (options & LEDGER_JSON_FULL); bool const bExpand (options & LEDGER_JSON_EXPAND); - ScopedLockType sl (mLock); - // DEPRECATED ledger[jss::seqNum] = beast::lexicalCastThrow (mLedgerSeq); diff --git a/src/ripple/module/app/ledger/Ledger.h b/src/ripple/module/app/ledger/Ledger.h index 776dc0a50..023b667a3 100644 --- a/src/ripple/module/app/ledger/Ledger.h +++ b/src/ripple/module/app/ledger/Ledger.h @@ -46,20 +46,6 @@ enum LedgerStateParms class SqliteStatement; -class LedgerBase -{ -protected: - LedgerBase (); - - // VFALCO TODO eliminate the need for friends - friend class TransactionEngine; - friend class Transactor; - - typedef RippleRecursiveMutex LockType; - typedef std::lock_guard ScopedLockType; - LockType mLock; -}; - // VFALCO TODO figure out exactly how this thing works. // It seems like some ledger database is stored as a global, static in the // class. But then what is the meaning of a Ledger object? Is this @@ -73,7 +59,6 @@ protected: */ class Ledger : public std::enable_shared_from_this - , public LedgerBase , public CountedObject , public beast::Uncopyable { diff --git a/src/ripple/module/app/transactors/Transactor.cpp b/src/ripple/module/app/transactors/Transactor.cpp index b6b470ed2..c644c23bc 100644 --- a/src/ripple/module/app/transactors/Transactor.cpp +++ b/src/ripple/module/app/transactors/Transactor.cpp @@ -262,9 +262,6 @@ TER Transactor::apply () if (terResult != tesSUCCESS) return (terResult); - // Restructure this to avoid the dependency on LedgerBase::mLock - Ledger::ScopedLockType sl (mEngine->getLedger ()->mLock); - mTxnAccount = mEngine->entryCache (ltACCOUNT_ROOT, Ledger::getAccountRootIndex (mTxnAccountID)); calculateFee ();