CatapultServer  v0.5.0.1 (Elephant)
SecretLockConfiguration.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 
37  uint16_t MinProofSize;
38 
40  uint16_t MaxProofSize;
41 
42  private:
43  SecretLockConfiguration() = default;
44 
45  public:
48 
51  };
52 }}
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;})
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
ValidatorContext.h
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
catapult::config::SecretLockConfiguration::Uninitialized
static SecretLockConfiguration Uninitialized()
Creates an uninitialized lock configuration.
Definition: SecretLockConfiguration.cpp:27
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
catapult::utils::BlockSpan
Represents a block duration.
Definition: BlockSpan.h:28
catapult::config::SecretLockConfiguration::MaxSecretLockDuration
utils::BlockSpan MaxSecretLockDuration
Maximum number of blocks for which a secret lock can exist.
Definition: SecretLockConfiguration.h:34
LOAD_PROPERTY
#define LOAD_PROPERTY(NAME)
catapult::model::CalculateSecretLockInfoHash
Hash256 CalculateSecretLockInfoHash(const Hash256 &secret, const Address &recipient)
Calculates the secret lock info hash from secret and recipient.
Definition: LockHashUtils.cpp:64
catapult::config::SecretLockConfiguration::MinProofSize
uint16_t MinProofSize
Minimum size of a proof in bytes.
Definition: SecretLockConfiguration.h:37
catapult::config::SecretLockConfiguration::SecretLockConfiguration
SecretLockConfiguration()=default
ConfigurationUtils.h
BlockSpan.h
ConfigurationBag.h
catapult::validators::ValidationResult::Success
Validation succeeded.
types.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::config::SecretLockConfiguration::MaxProofSize
uint16_t MaxProofSize
Maximum size of a proof in bytes.
Definition: SecretLockConfiguration.h:40
Validators.h
SecretLockConfiguration.h
catapult::config::SecretLockConfiguration::LoadFromBag
static SecretLockConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads lock configuration from bag.
Definition: SecretLockConfiguration.cpp:31
SecretLockInfoCache.h
catapult::config::SecretLockConfiguration
Secret lock plugin configuration settings.
Definition: SecretLockConfiguration.h:31