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

Namespaces

 catapult
 
 catapult::validators
 

Functions

 catapult::validators::DEFINE_STATEFUL_VALIDATOR (RemoteInteraction,([](const auto &notification, const auto &context) { if(model::AccountLinkTransaction::Entity_Type==notification.TransactionType) return ValidationResult::Success;const auto &cache=context.Cache.template sub< cache::AccountStateCache >();const auto &addresses=notification.ParticipantsByAddress;const auto &keys=notification.ParticipantsByKey;auto predicate=[&cache, &context](const auto &key) { return IsRemote(cache, GetResolvedKey(key, context.Resolvers));};return std::any_of(addresses.cbegin(), addresses.cend(), predicate)||std::any_of(keys.cbegin(), keys.cend(), predicate) ? Failure_AccountLink_Remote_Account_Participant_Not_Allowed :ValidationResult::Success;}))