CatapultServer  v0.5.0.1 (Elephant)
BlockDifficultyCacheStorage.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "BlockDifficultyCache.h"
24 
25 namespace catapult { namespace cache {
26 
28  struct BlockDifficultyCacheStorage : public CacheStorageForBasicInsertRemoveCache<BlockDifficultyCacheDescriptor> {
30  static void Save(const ValueType& info, io::OutputStream& output);
31 
34 
36  static void Purge(const ValueType& info, DestinationType& cacheDelta);
37  };
38 }}
CacheStorageInclude.h
catapult::io::Read
void Read(TIo &input, utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Reads base value from input.
Definition: PodIoUtils.h:60
BlockDifficultyCache.h
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::cache::BlockDifficultyCacheStorage
Policy for saving and loading block difficulty cache data.
Definition: BlockDifficultyCacheStorage.h:28
catapult::cache::CacheStorageForBasicInsertRemoveCache
Defines cache storage for cache with basic insert remove support.
Definition: src/catapult/cache/CacheStorageInclude.h:51
catapult::state::BlockDifficultyInfo
Definition: BlockDifficultyInfo.h:28
catapult::cache::BlockDifficultyCacheStorage::Save
static void Save(const ValueType &info, io::OutputStream &output)
Saves info to output.
Definition: BlockDifficultyCacheStorage.cpp:27
catapult::utils::BaseValue< uint64_t, Height_tag >
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
forwardsValidation.info
def info(*args)
Definition: forwardsValidation.py:12
catapult::cache::BlockDifficultyCacheStorage::Purge
static void Purge(const ValueType &info, DestinationType &cacheDelta)
Purges value from cacheDelta.
Definition: BlockDifficultyCacheStorage.cpp:41
catapult::io::Write
void Write(TIo &output, const utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Writes base value into output.
Definition: PodIoUtils.h:30
BlockDifficultyCacheStorage.h
catapult::cache::CacheStorageFromDescriptor< BlockDifficultyCacheDescriptor >::DestinationType
typename BlockDifficultyCacheDescriptor ::CacheDeltaType DestinationType
Cache delta type.
Definition: src/catapult/cache/CacheStorageInclude.h:40
catapult
Definition: AddressExtractionExtension.cpp:28
PodIoUtils.h
catapult::cache::CacheStorageFromDescriptor< BlockDifficultyCacheDescriptor >::ValueType
typename BlockDifficultyCacheDescriptor ::ValueType ValueType
Cache value type.
Definition: src/catapult/cache/CacheStorageInclude.h:46
Stream.h
catapult::io::OutputStream
Writer interface.
Definition: Stream.h:41
catapult::cache::BlockDifficultyCacheStorage::Load
static state::BlockDifficultyInfo Load(io::InputStream &input)
Loads a single value from input.
Definition: BlockDifficultyCacheStorage.cpp:33