CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 namespace catapult {
namespace cache {
83 std::unique_ptr<AccountStateCacheDeltaMixins::KeyLookupAdapter>&& pKeyLookupAdapter);
151 template<
typename TArray>
154 template<
typename TArray>
157 return Hasher(arrayHeightPair.second);
163 template<
typename TArray>
MutableAccessorMixin< TSet, TCacheDescriptor > MutableAccessor
Definition: CacheMixinAliases.h:36
std::pair< Height, TArray > ArrayHeightPair
Definition: AccountStateCacheDelta.h:152
SizeMixin< TSet > Size
Definition: CacheMixinAliases.h:31
void queueRemove(const Address &address, Height height)
Definition: AccountStateCacheDelta.cpp:162
Definition: AccountStateCacheDelta.h:155
model::AddressSet & m_removed
Definition: AccountStateCacheDelta.cpp:216
AddressMixins::ConstAccessor ConstAccessorAddress
Definition: AccountStateCacheDelta.h:46
deltaset::DeltaElementsMixin< TSet > DeltaElements
Definition: CacheMixinAliases.h:47
Key PublicKey
Public key of an account. Present if PublicKeyHeight > 0.
Definition: AccountState.h:64
void addAccount(const Address &address, Height addressHeight)
If not present, adds an account to the cache at given height (addressHeight) using address.
Definition: AccountStateCacheDelta.cpp:90
void commitRemovals()
Commits all queued removals.
Definition: AccountStateCacheDelta.cpp:170
uint64_t ImportanceGrouping
Importance grouping.
Definition: AccountStateCacheTypes.h:84
Tuple composed of information about high value addresses that is returned by highValueAddresses.
Definition: AccountStateCacheDelta.h:132
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
AccountStateCacheTypes::KeyLookupMapTypes::BaseSetDeltaPointerType m_pKeyToAddress
Definition: AccountStateCacheDelta.h:168
BasicAccountStateCacheDelta(const AccountStateCacheTypes::BaseSetDeltaPointers &accountStateSets, const AccountStateCacheTypes::Options &options, const model::AddressSet &highValueAddresses)
Creates a delta around accountStateSets, options and highValueAddresses.
Definition: AccountStateCacheDelta.cpp:29
std::unordered_set< Address, utils::ArrayHasher< Address > > AddressSet
Unordered set of addresses.
Definition: ContainerTypes.h:41
std::function< bool(TArgs...)> predicate
A predicate function.
Definition: functions.h:31
Mixin that wraps BaseSetDelta and provides a facade on top of BaseSetDelta::deltas().
Definition: DeltaElementsMixin.h:30
PatriciaTreeDeltaMixin< TSet, typename TCacheDescriptor::PatriciaTree::DeltaType > PatriciaTreeDelta
Definition: CacheMixinAliases.h:54
Account state data.
Definition: AccountState.h:44
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
Height PublicKeyHeight
Height at which public key has been obtained.
Definition: AccountState.h:67
typename BaseSetType::DeltaType BaseSetDeltaType
Base set delta type.
Definition: CacheDescriptorAdapters.h:84
AddressMixins::DeltaElements DeltaElements
Definition: AccountStateCacheDelta.h:51
model::AddressSet Removed
Addresses of accounts that were high value but are no longer high value after application of all delt...
Definition: AccountStateCacheDelta.h:137
MosaicId HarvestingMosaicId
Mosaic id used to provide harvesting ability.
Definition: AccountStateCacheTypes.h:94
size_t operator()(const ArrayHeightPair< TArray > &arrayHeightPair) const
Definition: AccountStateCacheDelta.h:156
void remove(const Address &address, Height height)
Definition: AccountStateCacheDelta.cpp:124
Definition: AccountStateBaseSets.h:41
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
A mixin for adding const access support to a cache.
Definition: CacheMixins.h:190
AddressMixins::Size Size
Definition: AccountStateCacheDelta.h:41
Custom sub view options.
Definition: AccountStateCacheTypes.h:79
QueuedRemovalSet< Key > m_queuedRemoveByPublicKey
Definition: AccountStateCacheDelta.h:175
catapult::Address Address
Address of an account.
Definition: AccountState.h:58
ContainsMixin< TSet, TCacheDescriptor > Contains
Definition: CacheMixinAliases.h:32
Amount minHarvesterBalance() const
Gets the minimum harvester balance.
Definition: AccountStateCacheDelta.cpp:71
ConstAccessorMixin< TSet, TCacheDescriptor > ConstAccessor
Definition: CacheMixinAliases.h:35
model::AddressSet Current
Addresses of accounts that are high value after application of all delta changes.
Definition: AccountStateCacheDelta.h:134
A mixin for adding contains support to a cache.
Definition: CacheMixins.h:54
AccountStateCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pStateByAddress
Definition: AccountStateCacheDelta.h:167
const_iterator find(const KeyType &key) const
Finds the cache value identified by key.
Definition: CacheMixins.h:207
iterator find(const KeyType &key)
Finds the cache value identified by key.
Definition: CacheMixins.h:239
std::unique_ptr< AccountStateCacheDeltaMixins::KeyLookupAdapter > m_pKeyLookupAdapter
Definition: AccountStateCacheDelta.h:172
Delta on top of the account state cache.
Definition: AccountStateCacheDelta.h:179
AccountStateCacheDelta(const AccountStateCacheTypes::BaseSetDeltaPointers &accountStateSets, const AccountStateCacheTypes::Options &options, const model::AddressSet &highValueAddresses)
Creates a delta around accountStateSets, options and highValueAddresses.
Definition: AccountStateCacheDelta.h:182
Address PublicKeyToAddress(const Key &publicKey, NetworkIdentifier networkIdentifier)
Creates an address from a public key (publicKey) for the network identified by networkIdentifier.
Definition: Address.cpp:50
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: AccountStateCacheDelta.cpp:63
A mixin for adding patricia tree support to a delta cache.
Definition: PatriciaTreeCacheMixins.h:62
A class that can be moved but not copied.
Definition: NonCopyable.h:43
MosaicId harvestingMosaicId() const
Gets the harvesting mosaic id.
Definition: AccountStateCacheDelta.cpp:75
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
const model::AddressSet & m_highValueAddresses
Definition: AccountStateCacheDelta.h:171
Basic delta on top of the account state cache.
Definition: AccountStateCacheDelta.h:57
MosaicId CurrencyMosaicId
Mosaic id used as primary chain currency.
Definition: AccountStateCacheTypes.h:91
Describes a key-based interface on top of an account state cache.
Definition: AccountStateCacheTypes.h:101
Definition: AccountStateCacheTypes.h:121
CompareChainsOptions m_options
Definition: CompareChains.cpp:165
bool contains(const KeyType &key) const
Gets a value indicating whether or not the cache contains an element with key.
Definition: CacheMixins.h:65
Amount MinHarvesterBalance
Definition: AccountStateCacheTypes.h:88
uint64_t importanceGrouping() const
Gets the network importance grouping.
Definition: AccountStateCacheDelta.cpp:67
model::NetworkIdentifier NetworkIdentifier
Network identifier.
Definition: AccountStateCacheTypes.h:81
std::shared_ptr< BaseSetDeltaType > BaseSetDeltaPointerType
Base set delta pointer type.
Definition: CacheDescriptorAdapters.h:87
Definition: AddressExtractionExtension.cpp:28
HighValueAddressesTuple highValueAddresses() const
Gets all high value addresses.
Definition: AccountStateCacheDelta.cpp:220
A mixin for adding size support to a cache.
Definition: CacheMixins.h:36
AddressMixins::MutableAccessor MutableAccessorAddress
Definition: AccountStateCacheDelta.h:48
QueuedRemovalSet< Address > m_queuedRemoveByAddress
Definition: AccountStateCacheDelta.h:174
std::unordered_set< ArrayHeightPair< TArray >, ArrayHeightPairHasher< TArray > > QueuedRemovalSet
Definition: AccountStateCacheDelta.h:164
Mixins used by the account state cache delta.
Definition: AccountStateCacheDelta.h:32
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
const AccountStateCacheTypes::Options & m_options
Definition: AccountStateCacheDelta.h:170
Address getAddress(const Key &publicKey)
Definition: AccountStateCacheDelta.cpp:79
A read-only overlay on top of an account cache.
Definition: ReadOnlyAccountStateCache.h:36
model::AddressSet & m_current
Definition: AccountStateCacheDelta.cpp:215
utils::ArrayHasher< TArray > Hasher
Definition: AccountStateCacheDelta.h:160
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
Definition: CacheMixins.h:222
AddressMixins::Contains ContainsAddress
Definition: AccountStateCacheDelta.h:42
const model::AddressSet & m_original
Definition: AccountStateCacheDelta.cpp:214
Grouping of all basic cache mixins for a single set.
Definition: CacheMixinAliases.h:30