| catapult::observers::DEFINE_OBSERVER (ModifyMultisigCosigners, Notification, [](const auto ¬ification, const ObserverContext &context) { auto &multisigCache=context.Cache.sub< cache::MultisigCache >();MultisigAccountFacade multisigAccountFacade(multisigCache, notification.Signer);const auto *pModifications=notification.ModificationsPtr;for(auto i=0u;i< notification.ModificationsCount;++i) { auto isNotificationAdd=model::CosignatoryModificationType::Add==pModifications[i].ModificationType;auto isNotificationForward=NotifyMode::Commit==context.Mode;if(isNotificationAdd==isNotificationForward) multisigAccountFacade.addCosignatory(pModifications[i].CosignatoryPublicKey);else multisigAccountFacade.removeCosignatory(pModifications[i].CosignatoryPublicKey);} }) |