CatapultServer  v0.5.0.1 (Elephant)
BlockDifficultyCache.h
Go to the documentation of this file.
1 
21 #pragma once
25 
26 namespace catapult { namespace cache {
27 
28  using BlockDifficultyBasicCache = BasicCache<
29  BlockDifficultyCacheDescriptor,
30  BlockDifficultyCacheTypes::BaseSets,
32 
36  public:
38  explicit BasicBlockDifficultyCache(uint64_t difficultyHistorySize)
39  // block difficulty cache must always be an in-memory cache
41  {}
42  };
43 
45  class BlockDifficultyCache : public SynchronizedCache<BasicBlockDifficultyCache> {
46  public:
48 
49  public:
51  explicit BlockDifficultyCache(uint64_t difficultyHistorySize)
53  {}
54  };
55 }}
DEFINE_CACHE_CONSTANTS
#define DEFINE_CACHE_CONSTANTS(NAME)
Defines cache constants for a cache with NAME.
Definition: CacheConstants.h:42
catapult::cache::CacheId::BlockDifficulty
catapult::cache::BasicBlockDifficultyCache
Definition: BlockDifficultyCache.h:35
catapult::tools::Options
boost::program_options::variables_map Options
Provides access to parsed options.
Definition: Options.h:34
BasicCache.h
catapult::cache::BlockDifficultyBasicCache
BasicCache< BlockDifficultyCacheDescriptor, BlockDifficultyCacheTypes::BaseSets, BlockDifficultyCacheTypes::Options > BlockDifficultyBasicCache
Definition: BlockDifficultyCache.h:31
catapult::cache::BlockDifficultyCacheTypes::Options
Custom sub view options.
Definition: BlockDifficultyCacheTypes.h:70
catapult::cache::SynchronizedCache
Decorator that synchronizes access to a cache.
Definition: SynchronizedCache.h:202
catapult::cache::BasicBlockDifficultyCache::BasicBlockDifficultyCache
BasicBlockDifficultyCache(uint64_t difficultyHistorySize)
Creates a cache with the specified difficulty history size (difficultyHistorySize).
Definition: BlockDifficultyCache.h:38
catapult::cache::BlockDifficultyCache::BlockDifficultyCache
BlockDifficultyCache(uint64_t difficultyHistorySize)
Creates a cache with the specified difficulty history size (difficultyHistorySize).
Definition: BlockDifficultyCache.h:51
BlockDifficultyCacheView.h
catapult::cache::BasicCache
Definition: BasicCache.h:32
catapult::cache::CacheConfiguration
Cache configuration.
Definition: CacheConfiguration.h:37
catapult::cache::BlockDifficultyCacheTypes
Definition: BlockDifficultyCacheTypes.h:62
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::BlockDifficultyCache
Synchronized cache composed of block difficulty information.
Definition: BlockDifficultyCache.h:45
BlockDifficultyCacheDelta.h