CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace cache {
class BlockDifficultyCache; }
28 namespace model {
struct BlockChainConfiguration; }
31 namespace catapult {
namespace chain {
34 bool IsChainLink(
const model::Block& parent,
const Hash256& parentHash,
const model::Block& child);
40 const cache::BlockDifficultyCache& cache,
41 const std::vector<const model::Block*>& blocks,
42 const model::BlockChainConfiguration& config);
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
utils::ByteArray< Hash256_Size, Hash256_tag > Hash256
Definition: src/catapult/types.h:47
Block chain configuration settings.
Definition: BlockChainConfiguration.h:33
Difficulty CalculateDifficulty(const cache::DifficultyInfoRange &difficultyInfos, const model::BlockChainConfiguration &config)
Definition: BlockDifficultyScorer.cpp:26
LockedCacheView< CacheViewType > createView() const
Returns a locked cache view based on this cache.
Definition: SynchronizedCache.h:218
def warning(*args)
Definition: colorPrint.py:10
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
Definition: BlockDifficultyInfo.h:28
Definition: ChainScore.h:30
uint32_t MaxDifficultyBlocks
Maximum number of blocks to use in a difficulty calculation.
Definition: BlockChainConfiguration.h:70
uint64_t CalculateScore(const model::Block &parentBlock, const model::Block ¤tBlock)
Calculates the score of currentBlock with parent parentBlock.
Definition: BlockScorer.cpp:99
Binary layout for a block.
Definition: Block.h:69
utils::ClampedBaseValue< uint64_t, Difficulty_tag > Difficulty
Definition: src/catapult/types.h:99
bool IsChainLink(const model::Block &parent, const Hash256 &parentHash, const model::Block &child)
Determines if parent with hash parentHash and child form a chain link.
Definition: ChainUtils.cpp:30
std::set< ElementType > MemorySetType
Definition: CacheDescriptorAdapters.h:118
model::ChainScore ChainScore
Definition: tools/health/main.cpp:43
Definition: AddressExtractionExtension.cpp:28
model::ChainScore CalculatePartialChainScore(const model::Block &parent, const std::vector< const model::Block * > &blocks)
Calculates the partial chain score of blocks starting at parent.
Definition: ChainUtils.cpp:90
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
Synchronized cache composed of block difficulty information.
Definition: BlockDifficultyCache.h:45
size_t CheckDifficulties(const cache::BlockDifficultyCache &cache, const std::vector< const model::Block * > &blocks, const model::BlockChainConfiguration &config)
Definition: ChainUtils.cpp:57