CatapultServer
v0.5.0.1 (Elephant)
|
A view on top of an account state cache for retrieving importances. More...
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 ReadOnlyAccountStateCache & | m_cache |
A view on top of an account state cache for retrieving importances.
|
explicit |
Creates a view around cache.
Returns true
if publicKey can harvest at height.
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.
bool catapult::cache::ImportanceView::tryGetAccountImportance | ( | const Key & | publicKey, |
Height | height, | ||
Importance & | importance | ||
) | const |
Tries to populate importance with the importance for publicKey at height.
|
private |