CatapultServer  v0.5.0.1 (Elephant)
AggregateMapper.h
Go to the documentation of this file.
1 
21 #pragma once
23 
24 namespace catapult { namespace mongo { namespace plugins {
25 
28  std::unique_ptr<MongoTransactionPlugin> CreateAggregateTransactionMongoPlugin(
29  const MongoTransactionRegistry& transactionRegistry,
30  model::EntityType transactionType);
31 }}}
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;})
MapperUtils.h
AggregateTransaction.h
catapult::mongo::MongoTransactionRegistry
A registry of mongo transaction plugins.
Definition: MongoTransactionPlugin.h:71
ValidatorContext.h
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
catapult::model::EntityType
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
catapult::mongo::plugins::CreateAggregateTransactionMongoPlugin
std::unique_ptr< MongoTransactionPlugin > CreateAggregateTransactionMongoPlugin(const MongoTransactionRegistry &transactionRegistry, model::EntityType transactionType)
Creates a mongo aggregate transaction plugin around transactionRegistry for transactions with type tr...
Definition: AggregateMapper.cpp:112
MongoTransactionPlugin.h
catapult::mongo::mappers::ToInt64
int64_t ToInt64(TBaseValue value)
Converts base value to int64_t.
Definition: MapperUtils.h:75
m_transactionType
model::EntityType m_transactionType
Definition: AggregateMapper.cpp:108
catapult::mongo::mappers::StreamEmbeddedTransaction
bson_stream::document & StreamEmbeddedTransaction(bson_stream::document &builder, const model::EmbeddedTransaction &transaction)
Streams an embedded transaction to builder.
Definition: MapperUtils.cpp:81
PLUGIN_API
#define PLUGIN_API
Definition: plugins.h:30
AggregateMapper.h
Validators.h
HashLockInfoCache.h
catapult::mongo::mappers
Definition: AccountStateMapper.cpp:26
CATAPULT_THROW_RUNTIME_ERROR
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
catapult::validators::ValidationResult::Success
Validation succeeded.
AggregateEntityType.h
m_transactionRegistry
const MongoTransactionRegistry & m_transactionRegistry
Definition: AggregateMapper.cpp:107
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::mongo::mappers::ToBinary
bsoncxx::types::b_binary ToBinary(const uint8_t *pData, size_t size)
Converts raw array (pData) of size elements into bson binary type.
Definition: MapperUtils.cpp:30