CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
struct | AccountActivitySummary |
Summarized account activity information. More... | |
struct | AccountSummary |
Summarized account information. More... | |
struct | ImportanceCalculationContext |
Context for importance calculation. More... | |
class | ImportanceCalculator |
Base class for all importance calculators. More... | |
Typedefs | |
using | ActivityBucketConsumer = consumer< state::AccountActivityBuckets::HeightDetachedActivityBucket & > |
Consumes and updates an activity bucket. More... | |
Functions | |
void | UpdateActivity (const Key &publicKey, const observers::ObserverContext &context, const ActivityBucketConsumer &commitAction, const ActivityBucketConsumer &rollbackAction) |
AccountActivitySummary | SummarizeAccountActivity (model::ImportanceHeight height, Height::ValueType importanceGrouping, const state::AccountActivityBuckets &buckets) |
void | FinalizeAccountActivity (model::ImportanceHeight height, Importance importance, state::AccountActivityBuckets &buckets) |
Finalizes account activity information contained in buckets at height with specified importance. More... | |
void | CalculateImportances (AccountSummary &accountSummary, const ImportanceCalculationContext &context, const model::BlockChainConfiguration &config) |
Calculates stake and activity importances using context and config and stores resulting importances in accountSummary. More... | |
std::unique_ptr< ImportanceCalculator > | CreateImportanceCalculator (const model::BlockChainConfiguration &config) |
Creates an importance calculator for the block chain described by config. More... | |
std::unique_ptr< ImportanceCalculator > | CreateRestoreImportanceCalculator () |
Creates a restore importance calculator. More... | |
using catapult::importance::ActivityBucketConsumer = typedef consumer<state::AccountActivityBuckets::HeightDetachedActivityBucket&> |
Consumes and updates an activity bucket.
void catapult::importance::CalculateImportances | ( | AccountSummary & | accountSummary, |
const ImportanceCalculationContext & | context, | ||
const model::BlockChainConfiguration & | config | ||
) |
Calculates stake and activity importances using context and config and stores resulting importances in accountSummary.
std::unique_ptr< ImportanceCalculator > catapult::importance::CreateImportanceCalculator | ( | const model::BlockChainConfiguration & | config | ) |
Creates an importance calculator for the block chain described by config.
std::unique_ptr< ImportanceCalculator > catapult::importance::CreateRestoreImportanceCalculator | ( | ) |
Creates a restore importance calculator.
void catapult::importance::FinalizeAccountActivity | ( | model::ImportanceHeight | height, |
Importance | importance, | ||
state::AccountActivityBuckets & | buckets | ||
) |
Finalizes account activity information contained in buckets at height with specified importance.
AccountActivitySummary catapult::importance::SummarizeAccountActivity | ( | model::ImportanceHeight | height, |
Height::ValueType | importanceGrouping, | ||
const state::AccountActivityBuckets & | buckets | ||
) |
Summarizes account activity information contained in buckets starting at height given specified importance grouping (importanceGrouping).
void catapult::importance::UpdateActivity | ( | const Key & | publicKey, |
const observers::ObserverContext & | context, | ||
const ActivityBucketConsumer & | commitAction, | ||
const ActivityBucketConsumer & | rollbackAction | ||
) |
Updates activity information for the account with specified public key (publicKey) given observer context and update functions (commitAction, rollbackAction).