CatapultServer  v0.5.0.1 (Elephant)
HashLockConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/types.h"
24 #include <stdint.h>
25 
26 namespace catapult { namespace utils { class ConfigurationBag; } }
27 
28 namespace catapult { namespace config {
29 
32  public:
35 
38 
39  private:
40  HashLockConfiguration() = default;
41 
42  public:
45 
48  };
49 }}
catapult::validators::DEFINE_STATEFUL_VALIDATOR
DEFINE_STATEFUL_VALIDATOR(EligibleHarvester, [](const auto &notification, 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;})
LOAD_PROPERTY
#define LOAD_PROPERTY(NAME)
catapult::utils::VerifyBagSizeLte
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
catapult::config::HashLockConfiguration::LoadFromBag
static HashLockConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads hash lock configuration from bag.
Definition: HashLockConfiguration.cpp:31
ValidatorContext.h
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
catapult::config::HashLockConfiguration::Uninitialized
static HashLockConfiguration Uninitialized()
Creates an uninitialized hash lock configuration.
Definition: HashLockConfiguration.cpp:27
HashLockConfiguration.h
catapult::utils::BaseValue< uint64_t, Amount_tag >
catapult::utils::BlockSpan
Represents a block duration.
Definition: BlockSpan.h:28
Validators.h
HashLockInfoCache.h
catapult::config::HashLockConfiguration
Hash lock plugin configuration settings.
Definition: HashLockConfiguration.h:31
catapult::config::HashLockConfiguration::HashLockConfiguration
HashLockConfiguration()=default
ConfigurationUtils.h
BlockSpan.h
ConfigurationBag.h
catapult::validators::ValidationResult::Success
Validation succeeded.
types.h
catapult::config::HashLockConfiguration::MaxHashLockDuration
utils::BlockSpan MaxHashLockDuration
Maximum number of blocks for which a hash lock can exist.
Definition: HashLockConfiguration.h:37
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::config::HashLockConfiguration::LockedFundsPerAggregate
Amount LockedFundsPerAggregate
Amount that has to be locked per aggregate in partial cache.
Definition: HashLockConfiguration.h:34