CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace state {
30 using RestrictionsMap = std::map<model::AccountRestrictionType, AccountRestriction>;
49 template<
typename TRestrictionValue>
51 const auto&
restriction = this->restriction<const RestrictionsMap, const AccountRestriction>(
m_restrictions, restrictionType);
72 template<
typename TRestrictionsMap,
typename TAccountRestriction>
75 if (restrictionsMap.cend() == iter)
Address m_address
Definition: AccountRestrictions.h:82
DEFINE_ACCOUNT_RESTRICTION_REDUNDANT_MODIFICATION_VALIDATOR(AccountAddressRestriction, UnresolvedAddress, utils::ArrayHasher< UnresolvedAddress >) DEFINE_ACCOUNT_RESTRICTION_REDUNDANT_MODIFICATION_VALIDATOR(AccountMosaicRestriction
utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag > UnresolvedAddress
Definition: src/catapult/types.h:66
bool HasRedundantModification
Definition: AccountRestrictionRedundantModificationValidator.cpp:30
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
Account restriction.
Definition: AccountRestriction.h:29
std::map< model::AccountRestrictionType, AccountRestriction > RestrictionsMap
Definition: AccountRestrictions.h:30
Account restriction type is a transaction type.
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
Typed account restriction.
Definition: TypedAccountRestriction.h:29
Account restriction descriptor.
Definition: AccountRestrictionDescriptor.h:37
size_t size() const
Gets the number of possible account restrictions.
Definition: AccountRestrictions.cpp:36
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
bool isEmpty() const
Returns true if no restrictions are set.
Definition: AccountRestrictions.cpp:40
static TAccountRestriction & restriction(TRestrictionsMap &restrictionsMap, model::AccountRestrictionType restrictionType)
Definition: AccountRestrictions.h:73
void addRestriction(model::AccountRestrictionType restrictionType, size_t restrictionValueSize)
Definition: AccountRestrictions.cpp:62
uint32_t Value
Definition: BlockScorer.cpp:32
const_iterator begin() const
Returns a const iterator to the first account restriction.
Definition: AccountRestrictions.cpp:54
Account restriction type is a mosaic id.
AccountRestrictions(const Address &address)
Creates account restrictions around address.
Definition: AccountRestrictions.cpp:26
RestrictionsMap m_restrictions
Definition: AccountRestrictions.h:83
bool HasDeleteModification
Definition: AccountRestrictionRedundantModificationValidator.cpp:31
Hasher object for a base value.
Definition: Hashers.h:43
const Address & address() const
Gets the account address.
Definition: AccountRestrictions.cpp:32
Account restrictions.
Definition: AccountRestrictions.h:28
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
const_iterator end() const
Returns a const iterator to the element following the last account restriction.
Definition: AccountRestrictions.cpp: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
TypedAccountRestriction< TRestrictionValue > restriction(model::AccountRestrictionType restrictionType) const
Gets the const typed account restriction specified by restrictionType.
Definition: AccountRestrictions.h:50
constexpr size_t Address_Decoded_Size
Definition: src/catapult/types.h:59
Definition: AddressExtractionExtension.cpp:28
Account restriction type is an address.
RestrictionsMap::const_iterator const_iterator
Definition: AccountRestrictions.h:31