CatapultServer  v0.5.0.1 (Elephant)
catapult::extensions::NemesisBlockLoader Class Reference

Loads and executes a nemesis block. More...

Collaboration diagram for catapult::extensions::NemesisBlockLoader:

Public Member Functions

 NemesisBlockLoader (cache::CatapultCacheDelta &cacheDelta, const plugins::PluginManager &pluginManager, std::unique_ptr< const observers::NotificationObserver > &&pObserver)
 Creates a loader around cacheDelta, pluginManager and pObserver. More...
 
void execute (const LocalNodeStateRef &stateRef, StateHashVerification stateHashVerification)
 Loads the nemesis block from storage, updates state in stateRef and verifies state hash (stateHashVerification). More...
 
void executeAndCommit (const LocalNodeStateRef &stateRef, StateHashVerification stateHashVerification=StateHashVerification::Enabled)
 
void execute (const model::BlockChainConfiguration &config, const model::BlockElement &nemesisBlockElement)
 

Private Types

enum  Verbosity { Verbosity::Off, Verbosity::On }
 

Private Member Functions

void execute (const model::BlockChainConfiguration &config, const model::BlockElement &nemesisBlockElement, state::CatapultState &catapultState, StateHashVerification stateHashVerification, Verbosity verbosity)
 

Private Attributes

cache::CatapultCacheDeltam_cacheDelta
 
const plugins::PluginManagerm_pluginManager
 
Key m_nemesisPublicKey
 
NemesisFundingState m_nemesisFundingState
 
std::unique_ptr< const observers::EntityObserverm_pObserver
 
std::unique_ptr< const model::NotificationPublisherm_pPublisher
 

Detailed Description

Loads and executes a nemesis block.

Member Enumeration Documentation

◆ Verbosity

Enumerator
Off 
On 

Constructor & Destructor Documentation

◆ NemesisBlockLoader()

catapult::extensions::NemesisBlockLoader::NemesisBlockLoader ( cache::CatapultCacheDelta cacheDelta,
const plugins::PluginManager pluginManager,
std::unique_ptr< const observers::NotificationObserver > &&  pObserver 
)

Creates a loader around cacheDelta, pluginManager and pObserver.

Member Function Documentation

◆ execute() [1/3]

void catapult::extensions::NemesisBlockLoader::execute ( const LocalNodeStateRef stateRef,
StateHashVerification  stateHashVerification 
)

Loads the nemesis block from storage, updates state in stateRef and verifies state hash (stateHashVerification).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute() [2/3]

void catapult::extensions::NemesisBlockLoader::execute ( const model::BlockChainConfiguration config,
const model::BlockElement nemesisBlockElement 
)

Executes the nemesis block (nemesisBlockElement), applies all changes to cache delta and checks consistency against config.

Note
Execution uses a default catapult state.
Here is the call graph for this function:

◆ execute() [3/3]

void catapult::extensions::NemesisBlockLoader::execute ( const model::BlockChainConfiguration config,
const model::BlockElement nemesisBlockElement,
state::CatapultState catapultState,
StateHashVerification  stateHashVerification,
Verbosity  verbosity 
)
private
Here is the call graph for this function:

◆ executeAndCommit()

void catapult::extensions::NemesisBlockLoader::executeAndCommit ( const LocalNodeStateRef stateRef,
StateHashVerification  stateHashVerification = StateHashVerification::Enabled 
)

Loads the nemesis block from storage, updates state in stateRef optionally verifying state hash (stateHashVerification) and commits all changes to cache.

Here is the call graph for this function:

Member Data Documentation

◆ m_cacheDelta

cache::CatapultCacheDelta& catapult::extensions::NemesisBlockLoader::m_cacheDelta
private

◆ m_nemesisFundingState

NemesisFundingState catapult::extensions::NemesisBlockLoader::m_nemesisFundingState
private

◆ m_nemesisPublicKey

Key catapult::extensions::NemesisBlockLoader::m_nemesisPublicKey
private

◆ m_pluginManager

const plugins::PluginManager& catapult::extensions::NemesisBlockLoader::m_pluginManager
private

◆ m_pObserver

std::unique_ptr<const observers::EntityObserver> catapult::extensions::NemesisBlockLoader::m_pObserver
private

◆ m_pPublisher

std::unique_ptr<const model::NotificationPublisher> catapult::extensions::NemesisBlockLoader::m_pPublisher
private

The documentation for this class was generated from the following files: