CatapultServer
v0.5.0.1 (Elephant)
|
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;})
Account restriction type is a transaction type.
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
ModifyAccountRestrictionNotification< EntityType, RestrictionAccount_Operation_Modifications_Notification > ModifyAccountOperationRestrictionNotification
Definition: AccountRestrictionNotifications.h:168
ModifyAccountRestrictionValueNotification< EntityType, RestrictionAccount_Operation_Modification_Notification > ModifyAccountOperationRestrictionValueNotification
Definition: AccountRestrictionNotifications.h:119
constexpr BasicEntityType ToBasicEntityType(EntityType type)
Converts an entity type into a basic entity type.
Definition: EntityType.h:70
#define DEFINE_ACCOUNT_RESTRICTION_TRANSACTION(VALUE_NAME, ENTITY_TYPE_NAME, VALUE_TYPE)
Definition: AccountRestrictionSharedTransaction.h:59
Address PublicKeyToAddress(const Key &publicKey, NetworkIdentifier networkIdentifier)
Creates an address from a public key (publicKey) for the network identified by networkIdentifier.
Definition: Address.cpp:50
Account restriction contains allowed values.
Definition: AddressExtractionExtension.cpp:28
Binary layout for an account restriction modification.
Definition: AccountRestrictionTypes.h:61
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;})