CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace utils {
class ConfigurationBag; } }
28 namespace catapult {
namespace config {
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;})
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
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
static SecretLockConfiguration Uninitialized()
Creates an uninitialized lock configuration.
Definition: SecretLockConfiguration.cpp:27
A simple bag of properties.
Definition: ConfigurationBag.h:57
Represents a block duration.
Definition: BlockSpan.h:28
utils::BlockSpan MaxSecretLockDuration
Maximum number of blocks for which a secret lock can exist.
Definition: SecretLockConfiguration.h:34
#define LOAD_PROPERTY(NAME)
Hash256 CalculateSecretLockInfoHash(const Hash256 &secret, const Address &recipient)
Calculates the secret lock info hash from secret and recipient.
Definition: LockHashUtils.cpp:64
uint16_t MinProofSize
Minimum size of a proof in bytes.
Definition: SecretLockConfiguration.h:37
SecretLockConfiguration()=default
Definition: AddressExtractionExtension.cpp:28
uint16_t MaxProofSize
Maximum size of a proof in bytes.
Definition: SecretLockConfiguration.h:40
static SecretLockConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads lock configuration from bag.
Definition: SecretLockConfiguration.cpp:31
Secret lock plugin configuration settings.
Definition: SecretLockConfiguration.h:31