| catapult::validators::DEFINE_STATEFUL_VALIDATOR (MosaicRecipient, [](const auto ¬ification, const ValidatorContext &context) { AccountRestrictionView view(context.Cache);if(!view.initialize(context.Resolvers.resolve(notification.Recipient))) return ValidationResult::Success;auto mosaicId=context.Resolvers.resolve(notification.MosaicId);auto isTransferAllowed=view.isAllowed(model::AccountRestrictionType::MosaicId, mosaicId);return isTransferAllowed ? ValidationResult::Success :Failure_RestrictionAccount_Mosaic_Transfer_Not_Allowed;}) |