CatapultServer  v0.5.0.1 (Elephant)
BlockExecutor.h
Go to the documentation of this file.
1 
21 #pragma once
24 #include <memory>
25 
26 namespace catapult { namespace model { struct Block; } }
27 
28 namespace catapult { namespace chain {
29 
32  public:
35  const observers::EntityObserver& observer,
36  const model::ResolverContext& resolvers,
38  : Observer(observer)
39  , Resolvers(resolvers)
40  , State(state)
41  {}
42 
43  public:
46 
49 
52  };
53 
55  void ExecuteBlock(const model::BlockElement& blockElement, const BlockExecutionContext& executionContext);
56 
58  void RollbackBlock(const model::BlockElement& blockElement, const BlockExecutionContext& executionContext);
59 }}
Block.h
catapult::chain::BlockExecutionContext::BlockExecutionContext
BlockExecutionContext(const observers::EntityObserver &observer, const model::ResolverContext &resolvers, observers::ObserverState &state)
Creates a block execution context around observer, resolvers and state.
Definition: BlockExecutor.h:34
catapult::observers::ObserverState::Cache
cache::CatapultCacheDelta & Cache
Catapult cache.
Definition: ObserverContext.h:64
catapult::chain::BlockExecutionContext::State
observers::ObserverState & State
State to update during observation.
Definition: BlockExecutor.h:51
catapult::cache::CatapultCacheDelta::sub
const TCache::CacheDeltaType & sub() const
Gets a specific sub cache delta view.
Definition: CatapultCacheDelta.h:47
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::chain::BlockExecutionContext::Resolvers
const model::ResolverContext & Resolvers
Alias resolvers.
Definition: BlockExecutor.h:48
catapult::observers::EntityObserver
Definition: EntityObserver.h:30
EntityObserver.h
catapult::model::ResolverContext
Context used to resolve unresolved types.
Definition: ResolverContext.h:28
ObserverTypes.h
catapult::model::BlockElement::Block
const model::Block & Block
Block entity.
Definition: Elements.h:63
catapult::chain::BlockExecutionContext
Block execution context.
Definition: BlockExecutor.h:31
catapult::observers::NotifyMode
NotifyMode
Enumeration of possible notification modes.
Definition: ObserverContext.h:41
catapult::model::ExtractEntityInfos
void ExtractEntityInfos(const BlockElement &element, WeakEntityInfos &entityInfos)
Extracts all entity infos from element into entityInfos.
Definition: Elements.cpp:88
Elements.h
BlockExecutor.h
catapult::observers::ObserverState
Block independent mutable state passed to all observers.
Definition: ObserverContext.h:54
catapult::model::BlockHeader::Height
catapult::Height Height
Height of a block.
Definition: Block.h:41
AccountStateCache.h
catapult::cache::AccountStateCache
Synchronized cache composed of stateful account information.
Definition: AccountStateCache.h:72
catapult::model::AccountRestrictionType::Block
Account restriction is interpreted as blocking operation.
catapult::model::BlockElement
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
catapult::chain::RollbackBlock
void RollbackBlock(const model::BlockElement &blockElement, const BlockExecutionContext &executionContext)
Rollbacks blockElement using the specified execution context (executionContext).
Definition: BlockExecutor.cpp:53
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::chain::BlockExecutionContext::Observer
const observers::EntityObserver & Observer
Observer to execute the block.
Definition: BlockExecutor.h:45
catapult::model::WeakEntityInfos
std::vector< WeakEntityInfo > WeakEntityInfos
A container of weak entity infos.
Definition: WeakEntityInfo.h:144
catapult::chain::ExecuteBlock
void ExecuteBlock(const model::BlockElement &blockElement, const BlockExecutionContext &executionContext)
Executes blockElement using the specified execution context (executionContext).
Definition: BlockExecutor.cpp:45