| catapult::validators::DEFINE_STATEFUL_VALIDATOR (RemoteInteraction,([](const auto ¬ification, 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;})) |