CatapultServer  v0.5.0.1 (Elephant)
AddressInteractionValidator.cpp File Reference
Include dependency graph for AddressInteractionValidator.cpp:

Namespaces

 catapult
 
 catapult::validators
 

Typedefs

using catapult::validators::CacheReadOnlyType = typename cache::AccountRestrictionCacheTypes::CacheReadOnlyType
 

Functions

 catapult::validators::DEFINE_STATEFUL_VALIDATOR (AddressInteraction, [](const auto &notification, const ValidatorContext &context) { auto networkIdentifier=context.Network.Identifier;auto sourceAddress=model::PublicKeyToAddress(notification.Source, networkIdentifier);for(const auto &address :notification.ParticipantsByAddress) { if(!IsInteractionAllowed(context.Cache, sourceAddress, context.Resolvers.resolve(address))) return Failure_RestrictionAccount_Signer_Address_Interaction_Not_Allowed;} for(const auto &key :notification.ParticipantsByKey) { auto address=model::PublicKeyToAddress(key, networkIdentifier);if(!IsInteractionAllowed(context.Cache, sourceAddress, address)) return Failure_RestrictionAccount_Signer_Address_Interaction_Not_Allowed;} return ValidationResult::Success;})