Add insight support to TaggedCache, KeyCache:

* Move TaggedCache, KeyCache to common
* Add radmap module, FullBelowCache class
* Add get_seconds_clock
* Inject FullBelowCache in SHAMap
This commit is contained in:
Vinnie Falco
2014-01-31 22:56:14 -08:00
parent 35715a0146
commit 2009f8b1ca
56 changed files with 814 additions and 194 deletions

View File

@@ -32,7 +32,7 @@ private:
typedef LockType::ScopedUnlockType ScopedUnlockType;
LockType mLock;
TaggedCacheType<uint256, ValidationSet> mValidations;
TaggedCache<uint256, ValidationSet> mValidations;
boost::unordered_map<uint160, SerializedValidation::pointer> mCurrentValidations;
std::vector<SerializedValidation::pointer> mStaleValidations;
@@ -60,9 +60,8 @@ private:
public:
ValidationsImp ()
: mLock (this, "Validations", __FILE__, __LINE__)
, mValidations ("Validations", 128, 600,
get_abstract_clock <std::chrono::steady_clock, std::chrono::seconds> (),
LogPartition::getJournal <TaggedCacheLog> ())
, mValidations ("Validations", 128, 600, get_seconds_clock (),
LogPartition::getJournal <TaggedCacheLog> ())
, mWriting (false)
{
mStaleValidations.reserve (512);