CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 namespace catapult {
namespace harvesting {
struct BlockExecutionHashes; } }
31 namespace catapult {
namespace harvesting {
41 const Key& beneficiary,
UnlockedAccountsView view() const
Gets a read only view of the unlocked accounts.
Definition: UnlockedAccounts.cpp:86
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
const model::BlockChainConfiguration m_config
Definition: Harvester.h:52
Predicate used to determine if a block is a hit or not.
Definition: BlockScorer.h:80
const UnlockedAccounts & m_unlockedAccounts
Definition: Harvester.h:54
std::unique_ptr< Block > CreateBlock(const PreviousBlockContext &context, NetworkIdentifier networkIdentifier, const Key &signerPublicKey, const Transactions &transactions)
Definition: BlockUtils.cpp:138
std::unique_ptr< model::Block > harvest(const model::BlockElement &lastBlockElement, Timestamp timestamp)
Definition: Harvester.cpp:82
const Key m_beneficiary
Definition: Harvester.h:53
void SignBlockHeader(const crypto::KeyPair &signer, Block &block)
Definition: BlockUtils.cpp:63
def debug(*args)
Definition: Parser.py:46
Block chain configuration settings.
Definition: BlockChainConfiguration.h:33
BlockGenerator m_blockGenerator
Definition: Harvester.h:55
catapult::Height Height
Block height.
Definition: BlockScorer.h:76
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::GenerationHash GenerationHash
Generation hash.
Definition: BlockScorer.h:64
Harvester(const cache::CatapultCache &cache, const model::BlockChainConfiguration &config, const Key &beneficiary, const UnlockedAccounts &unlockedAccounts, const BlockGenerator &blockGenerator)
Definition: Harvester.cpp:69
GenerationHash CalculateGenerationHash(const GenerationHash &previousGenerationHash, const Key &publicKey)
Definition: BlockUtils.cpp:50
utils::TimeSpan ElapsedTime
Time since the last block.
Definition: BlockScorer.h:67
std::function< std::unique_ptr< model::Block >(const model::BlockHeader &, uint32_t)> BlockGenerator
Generates a block from a seed block header given a maximum number of transactions.
Definition: HarvesterBlockGenerator.h:33
NetworkInfo Network
Block chain network.
Definition: BlockChainConfiguration.h:36
const model::Block & ParentBlock
Definition: Harvester.cpp:43
model::PreviousBlockContext ParentContext
Definition: Harvester.cpp:44
catapult::Difficulty Difficulty
Block difficulty.
Definition: BlockScorer.h:73
utils::TimeSpan BlockTime
Definition: Harvester.cpp:47
Level for logging debug events.
Container of all unlocked (harvesting candidate) accounts.
Definition: UnlockedAccounts.h:120
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
bool TryCalculateDifficulty(const cache::BlockDifficultyCache &cache, Height height, const model::BlockChainConfiguration &config, Difficulty &difficulty)
Definition: BlockDifficultyScorer.cpp:78
Central cache holding all sub caches.
Definition: CatapultCache.h:40
Simple RAII class that logs scope messages.
Definition: StackLogger.h:29
HarvestingConfiguration m_config
Definition: HarvestingService.cpp:126
uint32_t MaxTransactionsPerBlock
Maximum number of transactions per block.
Definition: BlockChainConfiguration.h:97
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
Synchronized cache composed of stateful account information.
Definition: AccountStateCache.h:72
Account restriction is interpreted as blocking operation.
const auto & publicKey() const
Returns a public key of a key pair.
Definition: KeyPair.h:56
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
const cache::CatapultCache & m_cache
Definition: Harvester.h:51
utils::ClampedBaseValue< uint64_t, Difficulty_tag > Difficulty
Definition: src/catapult/types.h:99
utils::BaseValue< uint64_t, Timestamp_tag > Timestamp
Definition: src/catapult/types.h:73
const TCache & sub() const
Gets a specific sub cache.
Definition: CatapultCache.h:56
Definition: AddressExtractionExtension.cpp:28
A read-only overlay on top of an account cache.
Definition: ReadOnlyAccountStateCache.h:36
Synchronized cache composed of block difficulty information.
Definition: BlockDifficultyCache.h:45
Key Signer
Public key of the block signer.
Definition: BlockScorer.h:70
Contextual information for calculating a block hit.
Definition: BlockScorer.h:56
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
const cache::CatapultCache & m_cache
Definition: JointValidator.cpp:84
A class that creates new blocks.
Definition: Harvester.h:34
A view on top of an account state cache for retrieving importances.
Definition: ImportanceView.h:29
NetworkIdentifier Identifier
Network identifier.
Definition: NetworkInfo.h:70
Importance getAccountImportanceOrDefault(const Key &publicKey, Height height) const
Gets the importance for publicKey at height or a default importance if no importance is set.
Definition: ImportanceView.cpp:76