CatapultServer  v0.5.0.1 (Elephant)
TransactionHashObserver.cpp File Reference
Include dependency graph for TransactionHashObserver.cpp:

Namespaces

 catapult
 
 catapult::observers
 

Functions

 catapult::observers::DEFINE_OBSERVER (TransactionHash, model::TransactionNotification, [](const auto &notification, const ObserverContext &context) { auto timestampedHash=state::TimestampedHash(notification.Deadline, notification.TransactionHash);auto &cache=context.Cache.sub< cache::HashCache >();if(NotifyMode::Commit==context.Mode) cache.insert(timestampedHash);else cache.remove(timestampedHash);})