CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::ImportanceView Class Reference

A view on top of an account state cache for retrieving importances. More...

Collaboration diagram for catapult::cache::ImportanceView:

Public Member Functions

 ImportanceView (const ReadOnlyAccountStateCache &cache)
 Creates a view around cache. More...
 
bool tryGetAccountImportance (const Key &publicKey, Height height, Importance &importance) const
 Tries to populate importance with the importance for publicKey at height. More...
 
Importance getAccountImportanceOrDefault (const Key &publicKey, Height height) const
 Gets the importance for publicKey at height or a default importance if no importance is set. More...
 
bool canHarvest (const Key &publicKey, Height height) const
 Returns true if publicKey can harvest at height. More...
 

Private Attributes

const ReadOnlyAccountStateCachem_cache
 

Detailed Description

A view on top of an account state cache for retrieving importances.

Constructor & Destructor Documentation

◆ ImportanceView()

catapult::cache::ImportanceView::ImportanceView ( const ReadOnlyAccountStateCache cache)
explicit

Creates a view around cache.

Member Function Documentation

◆ canHarvest()

bool catapult::cache::ImportanceView::canHarvest ( const Key publicKey,
Height  height 
) const

Returns true if publicKey can harvest at height.

Here is the call graph for this function:

◆ getAccountImportanceOrDefault()

Importance catapult::cache::ImportanceView::getAccountImportanceOrDefault ( const Key publicKey,
Height  height 
) const

Gets the importance for publicKey at height or a default importance if no importance is set.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryGetAccountImportance()

bool catapult::cache::ImportanceView::tryGetAccountImportance ( const Key publicKey,
Height  height,
Importance importance 
) const

Tries to populate importance with the importance for publicKey at height.

Here is the caller graph for this function:

Member Data Documentation

◆ m_cache

const ReadOnlyAccountStateCache& catapult::cache::ImportanceView::m_cache
private

The documentation for this class was generated from the following files: