CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
24 namespace catapult {
namespace mongo {
namespace plugins {
29 const MongoTransactionRegistry& transactionRegistry,
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;})
A registry of mongo transaction plugins.
Definition: MongoTransactionPlugin.h:71
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
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
int64_t ToInt64(TBaseValue value)
Converts base value to int64_t.
Definition: MapperUtils.h:75
model::EntityType m_transactionType
Definition: AggregateMapper.cpp:108
bson_stream::document & StreamEmbeddedTransaction(bson_stream::document &builder, const model::EmbeddedTransaction &transaction)
Streams an embedded transaction to builder.
Definition: MapperUtils.cpp:81
#define PLUGIN_API
Definition: plugins.h:30
Definition: AccountStateMapper.cpp:26
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
const MongoTransactionRegistry & m_transactionRegistry
Definition: AggregateMapper.cpp:107
Definition: AddressExtractionExtension.cpp:28
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