CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace model {
32 #define DEFINE_NAMESPACE_NOTIFICATION(DESCRIPTION, CODE, CHANNEL) DEFINE_NOTIFICATION_TYPE(CHANNEL, Namespace, DESCRIPTION, CODE)
43 #undef DEFINE_NAMESPACE_NOTIFICATION
55 size_t notificationSize,
98 template<
typename TAliasedData, NotificationType Aliased_Notification_Type>
const Key & Owner
Alias owner.
Definition: AliasNotifications.h:90
DEFINE_STATEFUL_VALIDATOR(EligibleHarvester, [](const auto ¬ification, const auto &context) { cache::ImportanceView view(context.Cache.template sub< cache::AccountStateCache >());return view.canHarvest(notification.Signer, context.Height) ? ValidationResult::Success :Failure_Core_Block_Harvester_Ineligible;})
Notification of aliased data.
Definition: AliasNotifications.h:99
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
static constexpr auto Notification_Type
Matching notification type.
Definition: AliasNotifications.h:79
Base alias notification.
Definition: AliasNotifications.h:50
TAliasedData AliasedData
Aliased data.
Definition: AliasNotifications.h:115
constexpr ValidationResult ValidateLessThanOrEqual(TValue value, TValue maxValue, ValidationResult failureResult)
Validates that value is less than or equal to maxValue and returns failureResult on failure.
Definition: ValidatorUtils.h:28
AliasOwnerNotification(const Key &owner, catapult::NamespaceId namespaceId, model::AliasAction aliasAction)
Creates a notification around owner, namespaceId and aliasAction.
Definition: AliasNotifications.h:83
AliasedDataNotification< MosaicId, Namespace_Aliased_MosaicId_Notification > AliasedMosaicIdNotification
Notification of an aliased mosaic id.
Definition: AliasNotifications.h:122
BaseAliasNotification(NotificationType notificationType, size_t notificationSize, catapult::NamespaceId namespaceId, model::AliasAction aliasAction)
Creates a base alias notification around namespaceId and aliasAction using notificationType and notif...
Definition: AliasNotifications.h:53
NotificationType
Enumeration of all possible notification types.
Definition: NotificationType.h:43
#define DEFINE_ALIASED_DATA_OBSERVER(OBSERVER_NAME, NOTIFICATION)
Definition: AliasedDataObservers.cpp:39
AliasedDataNotification< Address, Namespace_Aliased_Address_Notification > AliasedAddressNotification
Notification of an aliased address.
Definition: AliasNotifications.h:119
model::AliasAction AliasAction
Alias action.
Definition: AliasNotifications.h:68
static constexpr auto Notification_Type
Definition: AliasNotifications.h:104
Notification of alias owner.
Definition: AliasNotifications.h:76
A basic notification.
Definition: Notifications.h:36
DEFINE_NAMESPACE_NOTIFICATION(Alias_Owner, 0x0081, Validator)
Alias owner was provided.
Definition: AddressExtractionExtension.cpp:28
AliasAction
Alias transaction action.
Definition: NamespaceTypes.h:36
AliasedDataNotification(catapult::NamespaceId namespaceId, model::AliasAction aliasAction, const TAliasedData &aliasedData)
Creates a notification around namespaceId, aliasAction and aliasedData.
Definition: AliasNotifications.h:108
DEFINE_STATELESS_VALIDATOR(TransactionFee, [](const auto ¬ification) { if(notification.Fee > notification.MaxFee) return Failure_Core_Invalid_Transaction_Fee;constexpr auto Max_Raw_Block_Fee_Multiplier=static_cast< uint64_t >(std::numeric_limits< BlockFeeMultiplier::ValueType >::max());return notification.MaxFee.unwrap() > Max_Raw_Block_Fee_Multiplier *notification.TransactionSize ? Failure_Core_Invalid_Transaction_Fee :ValidationResult::Success;})
catapult::NamespaceId NamespaceId
Namespace id.
Definition: AliasNotifications.h:65
constexpr bool ShouldLink(TAction action, NotifyMode notifyMode)
Returns true if action and notifyMode indicate that a link should be made.
Definition: ObserverUtils.h:34