CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
23 namespace catapult {
namespace deltaset {
44 constexpr
const T&
value()
const {
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;})
constexpr const T & value() const
Returns the pruning boundary value.
Definition: PruningBoundary.h:44
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto ¬ification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
cache::MosaicCacheTypes::CacheReadOnlyType::ReadOnlyFindIterator< cache::MosaicCacheView::const_iterator, cache::MosaicCacheDelta::const_iterator > FindIterator
Iterator type returned by tryGet.
Definition: ActiveMosaicView.h:44
bool m_isSet
Definition: PruningBoundary.h:49
model::TransactionNotification Notification
Definition: CompletedAggregateObserver.cpp:29
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
constexpr PruningBoundary(const T &value)
Creates a pruning boundary around value.
Definition: PruningBoundary.h:34
for(const auto &name :reservedRootNamespaceNames) reservedRootIds.emplace(model return MAKE_STATELESS_VALIDATOR(NamespaceName,([maxNameSize, reservedRootIds](const auto ¬ification) { if(maxNameSize< notification.NameSize||!model::IsValidName(notification.NamePtr, notification.NameSize)) return Failure_Namespace_Invalid_Name;auto name=utils::RawString(reinterpret_cast< const char * >(notification.NamePtr), notification.NameSize);if(notification.NamespaceId !=model::GenerateNamespaceId(notification.ParentId, name)) return Failure_Namespace_Name_Id_Mismatch;auto namespaceId=Namespace_Base_Id==notification.ParentId ? notification.NamespaceId :notification.ParentId;if(reservedRootIds.cend() !=reservedRootIds.find(namespaceId)) return Failure_Namespace_Root_Name_Reserved;return ValidationResult::Success;}))
Definition: NamespaceNameValidator.cpp:36
uint16_t maxProofSize
Definition: ProofSecretValidator.cpp:38
Hash256 CalculateSecretLockInfoHash(const Hash256 &secret, const Address &recipient)
Calculates the secret lock info hash from secret and recipient.
Definition: LockHashUtils.cpp:64
T m_value
Definition: PruningBoundary.h:50
Hash256 CalculateHash(LockHashAlgorithm hashAlgorithm, const RawBuffer &data)
Calculates hashAlgorithm hash of data.
Definition: LockHashUtils.cpp:46
constexpr bool isSet() const
Returns true if the pruning boundary value is set.
Definition: PruningBoundary.h:39
constexpr PruningBoundary()
Creates a null pruning boundary.
Definition: PruningBoundary.h:30
static constexpr auto Receipt_Type
Definition: ProofObserver.cpp:35
Input is hashed twice with SHA-256.
Validation result is failure.
DECLARE_STATELESS_VALIDATOR(MaxTransactions, Notification)(uint32_t maxTransactions)
Definition: MaxTransactionsValidator.cpp:27
Represents an optional pruning boundary.
Definition: PruningBoundary.h:27
Definition: AddressExtractionExtension.cpp:28
Notification of use of an account address.
Definition: Notifications.h:57
LockHashAlgorithm
Lock secret hash algorithm.
Definition: LockHashAlgorithm.h:27