CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace chain {
39 const cache::BlockDifficultyCache& cache,
41 const model::BlockChainConfiguration& config,
Block chain configuration settings.
Definition: BlockChainConfiguration.h:33
Difficulty CalculateDifficulty(const cache::DifficultyInfoRange &difficultyInfos, const model::BlockChainConfiguration &config)
Definition: BlockDifficultyScorer.cpp:26
TValue ValueType
Raw value type.
Definition: BaseValue.h:33
LockedCacheView< CacheViewType > createView() const
Returns a locked cache view based on this cache.
Definition: SynchronizedCache.h:218
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto ¬ification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
Definition: BlockDifficultyInfo.h:28
constexpr ValueType unwrap() const
Unwraps this value and returns the underlying raw value.
Definition: BaseValue.h:53
A range of block difficulty infos.
Definition: BlockDifficultyCacheTypes.h:77
uint32_t MaxDifficultyBlocks
Maximum number of blocks to use in a difficulty calculation.
Definition: BlockChainConfiguration.h:70
utils::TimeSpan BlockGenerationTargetTime
Targeted time between blocks.
Definition: BlockChainConfiguration.h:51
View on top of the block difficulty cache.
Definition: BlockDifficultyCacheView.h:58
def info(*args)
Definition: forwardsValidation.py:12
bool TryCalculateDifficulty(const cache::BlockDifficultyCache &cache, Height height, const model::BlockChainConfiguration &config, Difficulty &difficulty)
Definition: BlockDifficultyScorer.cpp:78
DifficultyInfoRange difficultyInfos(Height height, size_t count) const
Gets a range object that spans count block difficulty infos starting at the specified height.
Definition: BlockDifficultyCacheView.cpp:42
constexpr uint64_t millis() const
Returns the number of milliseconds.
Definition: TimeSpan.h:91
utils::ClampedBaseValue< uint64_t, Difficulty_tag > Difficulty
Definition: src/catapult/types.h:99
Definition: AddressExtractionExtension.cpp:28
Base values that are constrained to a range of values.
Definition: ClampedBaseValue.h:27
Synchronized cache composed of block difficulty information.
Definition: BlockDifficultyCache.h:45