mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor TaggedCache
This commit is contained in:
@@ -50,7 +50,9 @@ public:
|
||||
, mLastCloseConvergeTime (1000 * LEDGER_IDLE_INTERVAL)
|
||||
, mLastCloseTime (0)
|
||||
, mLastValidationTime (0)
|
||||
, mFetchPack ("FetchPack", 65536, 45)
|
||||
, mFetchPack ("FetchPack", 65536, 45,
|
||||
get_abstract_clock <std::chrono::steady_clock, std::chrono::seconds> (),
|
||||
LogPartition::getJournal <TaggedCacheLog> ())
|
||||
, mFetchSeq (0)
|
||||
, mLastLoadBase (256)
|
||||
, mLastLoadFactor (256)
|
||||
@@ -453,7 +455,7 @@ private:
|
||||
SubMapType mSubTransactions; // all accepted transactions
|
||||
SubMapType mSubRTTransactions; // all proposed and accepted transactions
|
||||
|
||||
TaggedCacheType< uint256, Blob , UptimeTimerAdapter > mFetchPack;
|
||||
TaggedCacheType< uint256, Blob> mFetchPack;
|
||||
uint32 mFetchSeq;
|
||||
|
||||
uint32 mLastLoadBase;
|
||||
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
typedef LockType::ScopedUnlockType ScopedUnlockType;
|
||||
LockType mLock;
|
||||
|
||||
TaggedCacheType<uint256, ValidationSet, UptimeTimerAdapter> mValidations;
|
||||
TaggedCacheType<uint256, ValidationSet> mValidations;
|
||||
boost::unordered_map<uint160, SerializedValidation::pointer> mCurrentValidations;
|
||||
std::vector<SerializedValidation::pointer> mStaleValidations;
|
||||
|
||||
@@ -60,7 +60,10 @@ private:
|
||||
public:
|
||||
ValidationsImp ()
|
||||
: mLock (this, "Validations", __FILE__, __LINE__)
|
||||
, mValidations ("Validations", 128, 600), mWriting (false)
|
||||
, mValidations ("Validations", 128, 600,
|
||||
get_abstract_clock <std::chrono::steady_clock, std::chrono::seconds> (),
|
||||
LogPartition::getJournal <TaggedCacheLog> ())
|
||||
, mWriting (false)
|
||||
{
|
||||
mStaleValidations.reserve (512);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user