CatapultServer  v0.5.0.1 (Elephant)
catapult::importance Namespace Reference

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< ImportanceCalculatorCreateImportanceCalculator (const model::BlockChainConfiguration &config)
 Creates an importance calculator for the block chain described by config. More...
 
std::unique_ptr< ImportanceCalculatorCreateRestoreImportanceCalculator ()
 Creates a restore importance calculator. More...
 

Typedef Documentation

◆ ActivityBucketConsumer

Function Documentation

◆ CalculateImportances()

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.

Here is the call graph for this function:

◆ CreateImportanceCalculator()

std::unique_ptr< ImportanceCalculator > catapult::importance::CreateImportanceCalculator ( const model::BlockChainConfiguration config)

Creates an importance calculator for the block chain described by config.

Here is the caller graph for this function:

◆ CreateRestoreImportanceCalculator()

std::unique_ptr< ImportanceCalculator > catapult::importance::CreateRestoreImportanceCalculator ( )

Creates a restore importance calculator.

Here is the caller graph for this function:

◆ FinalizeAccountActivity()

void catapult::importance::FinalizeAccountActivity ( model::ImportanceHeight  height,
Importance  importance,
state::AccountActivityBuckets buckets 
)

Finalizes account activity information contained in buckets at height with specified importance.

Here is the call graph for this function:

◆ SummarizeAccountActivity()

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).

◆ UpdateActivity()

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).

Here is the call graph for this function: