| catapult::validators::DEFINE_STATELESS_VALIDATOR (StrictAggregateCosignatures, [](const auto ¬ification) { utils::ArrayPointerFlagMap< Key > cosigners;cosigners.emplace(¬ification.Signer, false);const auto *pCosignature=notification.CosignaturesPtr;for(auto i=0u;i< notification.CosignaturesCount;++i) { cosigners.emplace(&pCosignature->Signer, false);++pCosignature;} auto hasMissingCosigners=false;const auto *pTransaction=notification.TransactionsPtr;for(auto i=0u;i< notification.TransactionsCount;++i) { auto iter=cosigners.find(&pTransaction->Signer);if(cosigners.cend()==iter) hasMissingCosigners=true;else iter->second=true;pTransaction=AdvanceNext(pTransaction);} return std::all_of(cosigners.cbegin(), cosigners.cend(), [](const auto &pair) { return pair.second;}) ? hasMissingCosigners ? Failure_Aggregate_Missing_Cosigners :ValidationResult::Success :Failure_Aggregate_Ineligible_Cosigners;}) |