CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace cache {
class ReadOnlyCatapultCache; } }
28 namespace catapult {
namespace validators {
42 template<
typename TRestrictionValue>
45 return restrictions.template restriction<TRestrictionValue>(restrictionType);
49 template<
typename TRestrictionValue>
51 auto typedRestriction = get<TRestrictionValue>(restrictionType);
52 if (0 == typedRestriction.size())
55 const auto& descriptor = typedRestriction.descriptor();
57 return typedRestriction.contains(value);
59 return !typedRestriction.contains(value);
DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_VALIDATOR(AccountAddressRestrictionValueModification, model::ModifyAccountAddressRestrictionValueNotification, Address) DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_VALIDATOR(AccountMosaicRestrictionValueModification
cache::AccountRestrictionCacheTypes::CacheReadOnlyType::ReadOnlyFindIterator< cache::AccountRestrictionCacheView::const_iterator, cache::AccountRestrictionCacheDelta::const_iterator > FindIterator
Definition: AccountRestrictionView.h:66
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
A view on top of a catapult cache cache for retrieving a typed account restriction.
Definition: AccountRestrictionView.h:31
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
Typed account restriction.
Definition: TypedAccountRestriction.h:29
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
const cache::ReadOnlyCatapultCache & m_cache
Definition: AccountRestrictionView.h:68
#define DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_OBSERVER(RESTRICTION_VALUE_NAME)
Definition: AccountRestrictionValueModificationObserver.cpp:74
const TCache::CacheReadOnlyType & sub() const
Gets a specific sub cache read-only view.
Definition: ReadOnlyCatapultCache.h:35
ModifyAccountRestrictionValueNotification< UnresolvedAddress, RestrictionAccount_Address_Modification_Notification > ModifyAccountAddressRestrictionValueNotification
Definition: AccountRestrictionNotifications.h:115
ModifyAccountRestrictionValueNotification< EntityType, RestrictionAccount_Operation_Modification_Notification > ModifyAccountOperationRestrictionValueNotification
Definition: AccountRestrictionNotifications.h:119
Find iterator returned by ReadOnlyArtifactCache::find.
Definition: ReadOnlyArtifactCache.h:33
state::TypedAccountRestriction< TRestrictionValue > get(model::AccountRestrictionType restrictionType) const
Definition: AccountRestrictionView.h:43
bool initialize(const Address &address)
Tries to initialize the internal iterator for account restriction with address.
Definition: AccountRestrictionView.cpp:30
An iterator that is returned by cache find functions.
Definition: CacheMixins.h:142
Synchronized cache composed of account restriction information.
Definition: AccountRestrictionCache.h:36
auto ToVector(T value)
Converts value to a vector.
Definition: AccountRestrictionUtils.h:30
OperationType
Definition: MultisigAggregateSufficientCosignersValidator.cpp:32
const TValue & get() const
Gets a const value.
Definition: ReadOnlyArtifactCache.h:53
const TValue * tryGet() const
Tries to get a const value.
Definition: ReadOnlyArtifactCache.h:58
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
AccountRestrictionModificationType
Account restriction modification type.
Definition: AccountRestrictionTypes.h:51
AccountRestrictionView(const cache::ReadOnlyCatapultCache &cache)
Creates a view around cache.
Definition: AccountRestrictionView.cpp:27
bool isAllowed(model::AccountRestrictionType restrictionType, const TRestrictionValue &value)
Returns true if value is allowed.
Definition: AccountRestrictionView.h:50
Account restriction contains allowed values.
AccountRestrictionOperationType
Operation type.
Definition: AccountRestrictionDescriptor.h:28
Definition: AddressExtractionExtension.cpp:28
detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, SetIteratorType, const ValueType > const_iterator
Find (const) iterator.
Definition: CacheMixins.h:198
const cache::CatapultCache & m_cache
Definition: JointValidator.cpp:84
A read-only overlay on top of a catapult cache.
Definition: ReadOnlyCatapultCache.h:27
ModifyAccountRestrictionValueNotification< UnresolvedMosaicId, RestrictionAccount_Mosaic_Modification_Notification > ModifyAccountMosaicRestrictionValueNotification
Definition: AccountRestrictionNotifications.h:117
FindIterator m_iter
Definition: AccountRestrictionView.h:69