CatapultServer  v0.5.0.1 (Elephant)
EmbeddedTransaction.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "EntityBody.h"
23 #include "SizePrefixedEntity.h"
24 #include <iosfwd>
25 
26 namespace catapult {
27  namespace model {
28  class NotificationSubscriber;
29  class TransactionRegistry;
30  }
31 }
32 
33 namespace catapult { namespace model {
34 
35 #pragma pack(push, 1)
36 
38  struct EmbeddedTransaction : public EntityBody<SizePrefixedEntity> {};
39 
40 #pragma pack(pop)
41 
43  std::ostream& operator<<(std::ostream& out, const EmbeddedTransaction& transaction);
44 
47  bool IsSizeValid(const EmbeddedTransaction& transaction, const TransactionRegistry& registry);
48 
51 }}
catapult::model::PublishNotifications
void PublishNotifications(const EmbeddedTransaction &transaction, NotificationSubscriber &sub)
Sends all notifications from transaction to sub.
Definition: EmbeddedTransaction.cpp:61
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;})
EmbeddedTransaction.h
CATAPULT_LOG
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
Transaction.h
catapult::model::NotificationSubscriber
A notification subscriber.
Definition: NotificationSubscriber.h:27
ValidatorContext.h
colorPrint.warning
def warning(*args)
Definition: colorPrint.py:10
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
NotificationSubscriber.h
Validators.h
EntityBody.h
catapult::model::EntityBody::Signer
Key Signer
Entity signer's public key.
Definition: EntityBody.h:36
TransactionPlugin.h
SizePrefixedEntity.h
AccountStateCache.h
catapult::model::operator<<
std::ostream & operator<<(std::ostream &out, const EmbeddedTransaction &transaction)
Insertion operator for outputting transaction to out.
Definition: EmbeddedTransaction.cpp:28
catapult::model::EntityBody::EntityVersion
uint8_t EntityVersion() const
Returns version of an entity.
Definition: EntityBody.h:50
catapult::model::EmbeddedTransaction
Binary layout for an embedded transaction (non-verifiable).
Definition: EmbeddedTransaction.h:38
catapult::model::IsSizeValid
bool IsSizeValid(const AggregateTransaction &aggregate, const TransactionRegistry &registry)
Definition: AggregateTransaction.cpp:38
catapult::model::EntityBody
Binary layout for an entity body.
Definition: EntityBody.h:33
catapult::validators::ValidationResult::Success
Validation succeeded.
catapult::model::AccountPublicKeyNotification
Notification of use of an account public key.
Definition: Notifications.h:75
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::TransactionRegistry
A registry of transaction plugins.
Definition: TransactionPlugin.h:98
catapult::model::NotificationSubscriber::notify
virtual void notify(const Notification &notification)=0
Notifies the subscriber of notification.
ImportanceView.h
catapult::model::SizePrefixedEntity::Size
uint32_t Size
Entity size.
Definition: SizePrefixedEntity.h:33
catapult::model::EntityBody::Type
EntityType Type
Entity type.
Definition: EntityBody.h:42