CatapultServer  v0.5.0.1 (Elephant)
ActivityObserverUtils.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/functions.h"
24 
25 namespace catapult { namespace observers { struct ObserverContext; } }
26 
27 namespace catapult { namespace importance {
28 
31 
34  void UpdateActivity(
35  const Key& publicKey,
36  const observers::ObserverContext& context,
37  const ActivityBucketConsumer& commitAction,
38  const ActivityBucketConsumer& rollbackAction);
39 }}
catapult::model::ImportanceHeight
utils::BaseValue< Height::ValueType, ImportanceHeight_tag > ImportanceHeight
Represents a height at which importance is calculated.
Definition: ImportanceHeight.h:29
catapult::observers::ObserverContext::Cache
cache::CatapultCacheDelta & Cache
Catapult cache.
Definition: ObserverContext.h:86
catapult::observers::ObserverContext
Context passed to all the observers.
Definition: ObserverContext.h:78
catapult::Amount
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
catapult::cache::CatapultCacheDelta::sub
const TCache::CacheDeltaType & sub() const
Gets a specific sub cache delta view.
Definition: CatapultCacheDelta.h:47
functions.h
catapult::state::AccountActivityBuckets::HeightDetachedActivityBucket::TotalFeesPaid
Amount TotalFeesPaid
Total fees paid by account.
Definition: AccountActivityBuckets.h:34
ObserverContext.h
catapult::state::AccountActivityBuckets::ActivityBucket::StartHeight
model::ImportanceHeight StartHeight
Activity start height.
Definition: AccountActivityBuckets.h:46
catapult::state::AccountActivityBuckets::ActivityBucket
Temporal activity information including height.
Definition: AccountActivityBuckets.h:44
AccountActivityBuckets.h
AccountStateCache.h
catapult::cache::AccountStateCache
Synchronized cache composed of stateful account information.
Definition: AccountStateCache.h:72
catapult::observers::ObserverContext::Mode
const NotifyMode Mode
Notification mode.
Definition: ObserverContext.h:95
catapult::state::AccountActivityBuckets::HeightDetachedActivityBucket::RawScore
uint64_t RawScore
Optional user defined score component.
Definition: AccountActivityBuckets.h:40
catapult::state::AccountActivityBuckets::HeightDetachedActivityBucket::BeneficiaryCount
uint32_t BeneficiaryCount
Number of times account has been used as a beneficiary.
Definition: AccountActivityBuckets.h:37
catapult::importance::UpdateActivity
void UpdateActivity(const Key &publicKey, const observers::ObserverContext &context, const ActivityBucketConsumer &commitAction, const ActivityBucketConsumer &rollbackAction)
Definition: ActivityObserverUtils.cpp:36
catapult
Definition: AddressExtractionExtension.cpp:28
ActivityObserverUtils.h
catapult::importance::ActivityBucketConsumer
consumer< state::AccountActivityBuckets::HeightDetachedActivityBucket & > ActivityBucketConsumer
Consumes and updates an activity bucket.
Definition: ActivityObserverUtils.h:30
catapult::observers::ObserverContext::Height
const catapult::Height Height
Current height.
Definition: ObserverContext.h:92
catapult::utils::ByteArray
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
catapult::consumer
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
catapult::model::ConvertToImportanceHeight
ImportanceHeight ConvertToImportanceHeight(Height height, Height::ValueType grouping)
Definition: ImportanceHeight.cpp:33