Go to the source code of this file.
◆ DEFINE_LOCK_DURATION_VALIDATOR
#define DEFINE_LOCK_DURATION_VALIDATOR |
( |
|
VALIDATOR_NAME, |
|
|
|
NOTIFICATION_TYPE, |
|
|
|
FAILURE_RESULT |
|
) |
| |
Value:
using ValidatorType = stateless::FunctionalNotificationValidatorT<NOTIFICATION_TYPE>; \
return std::make_unique<ValidatorType>(#VALIDATOR_NAME "Validator", [maxDuration](const auto& notification) { \
return
BlockDuration(0) != notification.Duration && notification.Duration <= maxDuration \
? ValidationResult::Success \
: FAILURE_RESULT; \
}); \
}
Defines a lock duration validator with name VALIDATOR_NAME for notification NOTIFICATION_TYPE that returns FAILURE_RESULT on failure.