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