|
CatapultServer
v0.5.0.1 (Elephant)
|
Basic delta on top of the block difficulty cache. More...


Public Member Functions | |
| BasicBlockDifficultyCacheDelta (const BlockDifficultyCacheTypes::BaseSetDeltaPointers &difficultyInfoSets, const BlockDifficultyCacheTypes::Options &options) | |
| Creates a delta around difficultyInfoSets and options. More... | |
| deltaset::PruningBoundary< ValueType > | pruningBoundary () const |
| Gets the pruning boundary that is used during commit. More... | |
| std::unique_ptr< IterableView > | tryMakeIterableView () const |
| void | insert (const ValueType &info) |
| Inserts a block difficulty info into the set. More... | |
| void | insert (Height height, Timestamp timestamp, Difficulty difficulty) |
| Inserts a block difficulty info into the set given a height and a timestamp and a difficulty. More... | |
| void | remove (const ValueType &info) |
| Removes a block difficulty info from the set. More... | |
| void | remove (Height height) |
| Removes a block difficulty info from the set given a height. More... | |
| void | prune (Height height) |
Public Member Functions inherited from catapult::utils::MoveOnly | |
| constexpr | MoveOnly ()=default |
| Default constructor. More... | |
| ~MoveOnly ()=default | |
| Default destructor. More... | |
| MoveOnly (const NonCopyable &)=delete | |
| Disabled copy constructor. More... | |
| MoveOnly (MoveOnly &&)=default | |
| Default move constructor. More... | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| Disabled assignment operator. More... | |
| MoveOnly & | operator= (MoveOnly &&)=default |
| Default move assignment operator. More... | |
Public Member Functions inherited from catapult::cache::SizeMixin< TSet > | |
| SizeMixin (const TSet &set) | |
| Creates a mixin around set. More... | |
| size_t | size () const |
| Gets the number of elements in the cache. More... | |
Public Member Functions inherited from catapult::cache::ContainsMixin< TSet, TCacheDescriptor > | |
| ContainsMixin (const TSet &set) | |
| Creates a mixin around set. More... | |
| bool | contains (const KeyType &key) const |
| Gets a value indicating whether or not the cache contains an element with key. More... | |
Public Member Functions inherited from catapult::deltaset::DeltaElementsMixin< TSetDelta > | |
| DeltaElementsMixin (const TSetDelta &setDelta) | |
| Creates a mixin around setDelta. More... | |
| PointerContainer | addedElements () const |
| Gets pointers to all added elements. More... | |
| PointerContainer | modifiedElements () const |
| Gets pointers to all modified elements. More... | |
| PointerContainer | removedElements () const |
| Gets pointers to all removed elements. More... | |
Private Member Functions | |
| void | checkInsert (Height height) |
| void | checkRemove (Height height) const |
| Height | nextHeight () const |
Basic delta on top of the block difficulty cache.
| using catapult::cache::BasicBlockDifficultyCacheDelta::IterableView = IterationMixin<BlockDifficultyCacheTypes::PrimaryTypes::BaseSetDeltaType>::IterableView |
| using catapult::cache::BasicBlockDifficultyCacheDelta::ReadOnlyView = BlockDifficultyCacheTypes::CacheReadOnlyType |
| using catapult::cache::BasicBlockDifficultyCacheDelta::ValueType = BlockDifficultyCacheDescriptor::ValueType |
|
explicit |
Creates a delta around difficultyInfoSets and options.
|
private |


|
private |


| void catapult::cache::BasicBlockDifficultyCacheDelta::insert | ( | const ValueType & | info | ) |
Inserts a block difficulty info into the set.

| void catapult::cache::BasicBlockDifficultyCacheDelta::insert | ( | Height | height, |
| Timestamp | timestamp, | ||
| Difficulty | difficulty | ||
| ) |
Inserts a block difficulty info into the set given a height and a timestamp and a difficulty.

|
private |


| void catapult::cache::BasicBlockDifficultyCacheDelta::prune | ( | Height | height | ) |
Removes all block difficulty infos that have a height less than the given height minus a constant (constant = rewrite limit + 60).
| deltaset::PruningBoundary< BasicBlockDifficultyCacheDelta::ValueType > catapult::cache::BasicBlockDifficultyCacheDelta::pruningBoundary | ( | ) | const |
Gets the pruning boundary that is used during commit.
| void catapult::cache::BasicBlockDifficultyCacheDelta::remove | ( | const ValueType & | info | ) |
Removes a block difficulty info from the set.

| void catapult::cache::BasicBlockDifficultyCacheDelta::remove | ( | Height | height | ) |
Removes a block difficulty info from the set given a height.

| std::unique_ptr< BasicBlockDifficultyCacheDelta::IterableView > catapult::cache::BasicBlockDifficultyCacheDelta::tryMakeIterableView | ( | ) | const |
Creates an iterable view of the cache.
|
private |
|
private |
|
private |
|
private |