| catapult::observers::DEFINE_OBSERVER (MosaicDefinition, model::MosaicDefinitionNotification, [](const auto ¬ification, const ObserverContext &context) { auto &cache=context.Cache.sub< cache::MosaicCache >();auto mosaicIter=cache.find(notification.MosaicId);if(mosaicIter.tryGet()) { auto mosaicEntry=mosaicIter.get();cache.remove(notification.MosaicId);if(NotifyMode::Rollback==context.Mode &&1==mosaicEntry.definition().revision()) return;cache.insert(ApplyNotification(mosaicEntry, notification, context.Mode));} else { auto definition=state::MosaicDefinition(context.Height, notification.Signer, 1, notification.Properties);cache.insert(state::MosaicEntry(notification.MosaicId, definition));} }) |