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

Namespaces

 catapult
 
 catapult::validators
 

Functions

 catapult::validators::DEFINE_STATEFUL_VALIDATOR (Transaction, [](const auto &notification, const ValidatorContext &context) { AccountRestrictionView view(context.Cache);if(!view.initialize(model::PublicKeyToAddress(notification.Signer, context.Network.Identifier))) return ValidationResult::Success;auto isTransferAllowed=view.isAllowed(model::AccountRestrictionType::TransactionType, notification.TransactionType);return isTransferAllowed ? ValidationResult::Success :Failure_RestrictionAccount_Transaction_Type_Not_Allowed;})