CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
24 namespace catapult {
namespace consumers {
34 constexpr
HashCheckOptions(uint64_t cacheDuration, uint64_t pruneInterval, uint64_t maxCacheSize)
uint64_t CacheDuration
Amount of time a hash should be cached.
Definition: HashCheckOptions.h:42
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
utils::ByteArray< Hash256_Size, Hash256_tag > Hash256
Definition: src/catapult/types.h:47
DisruptorConsumerT< TransactionElements > TransactionConsumer
A transaction disruptor consumer function.
Definition: DisruptorConsumer.h:44
DisruptorConsumerT< const BlockElements > ConstBlockConsumer
A const block disruptor consumer function.
Definition: DisruptorConsumer.h:41
predicate< Timestamp, const Hash256 & > KnownHashPredicate
Predicate for determining if a hash is known.
Definition: ChainFunctions.h:36
void UpdateHashes(const TransactionRegistry &transactionRegistry, const GenerationHash &generationHash, TransactionElement &transactionElement)
Definition: EntityHasher.cpp:95
constexpr HashCheckOptions()
Creates default options.
Definition: HashCheckOptions.h:30
disruptor::BlockConsumer CreateBlockHashCalculatorConsumer(const GenerationHash &generationHash, const model::TransactionRegistry &transactionRegistry)
Definition: HashCalculatorConsumer.cpp:72
disruptor::ConstBlockConsumer CreateBlockHashCheckConsumer(const chain::TimeSupplier &timeSupplier, const HashCheckOptions &options)
Definition: HashCheckConsumer.cpp:56
Hash256 CalculateHash(LockHashAlgorithm hashAlgorithm, const RawBuffer &data)
Calculates hashAlgorithm hash of data.
Definition: LockHashUtils.cpp:46
const model::TransactionRegistry & m_transactionRegistry
Definition: HashCalculatorConsumer.cpp:68
DisruptorConsumerT< BlockElements > BlockConsumer
A block disruptor consumer function.
Definition: DisruptorConsumer.h:38
disruptor::TransactionConsumer CreateTransactionHashCalculatorConsumer(const GenerationHash &generationHash, const model::TransactionRegistry &transactionRegistry)
Definition: HashCalculatorConsumer.cpp:103
constexpr disruptor::ConsumerResult Abort(validators::ValidationResult validationResult)
Creates an aborted consumer result around validationResult.
Definition: ConsumerResultFactory.h:34
std::vector< FreeTransactionElement > TransactionElements
A container of FreeTransactionElement.
Definition: DisruptorTypes.h:135
disruptor::TransactionConsumer CreateTransactionHashCheckConsumer(const chain::TimeSupplier &timeSupplier, const HashCheckOptions &options, const chain::KnownHashPredicate &knownHashPredicate)
Definition: HashCheckConsumer.cpp:107
std::vector< model::BlockElement > BlockElements
A container of BlockElement.
Definition: DisruptorTypes.h:132
uint64_t PruneInterval
Minimum amount of time between cache pruning.
Definition: HashCheckOptions.h:45
supplier< Timestamp > TimeSupplier
Supplies a timestamp.
Definition: ChainFunctions.h:39
uint64_t MaxCacheSize
Maximum size of the cache.
Definition: HashCheckOptions.h:48
Definition: AddressExtractionExtension.cpp:28
utils::ByteArray< Hash256_Size, GenerationHash_tag > GenerationHash
Definition: src/catapult/types.h:53
A registry of transaction plugins.
Definition: TransactionPlugin.h:98
Options for configuring the hash check consumer.
Definition: HashCheckOptions.h:27
GenerationHash m_generationHash
Definition: HashCalculatorConsumer.cpp:67
constexpr HashCheckOptions(uint64_t cacheDuration, uint64_t pruneInterval, uint64_t maxCacheSize)
Creates options with custom cacheDuration, pruneInterval and maxCacheSize.
Definition: HashCheckOptions.h:34
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
RecentHashCache m_recentHashCache
Definition: HashCheckConsumer.cpp:52
constexpr disruptor::ConsumerResult Continue()
Creates a continuation consumer result.
Definition: ConsumerResultFactory.h:29
chain::KnownHashPredicate m_knownHashPredicate
Definition: HashCheckConsumer.cpp:103