Kagome
Polkadot Runtime Engine in C++17
SearchChainCommand Class Reference
Inheritance diagram for SearchChainCommand:
Collaboration diagram for SearchChainCommand:

Public Types

enum  Target { Target::Justification, Target::AuthorityUpdate, Target::LastBlock }
 

Public Member Functions

 SearchChainCommand (std::shared_ptr< BlockStorage > block_storage, std::shared_ptr< TrieStorage > trie_storage, std::shared_ptr< kagome::authority::AuthorityManager > authority_manager, std::shared_ptr< Hasher > hasher)
 
virtual void execute (std::ostream &out, const ArgumentList &args) override
 
- Public Member Functions inherited from Command
 Command (std::string name, std::string description)
 
virtual ~Command ()=default
 
std::string_view getName () const
 
std::string_view getDescription () const
 

Private Member Functions

Target parseTarget (const char *arg) const
 
void searchBlock (std::ostream &out, BlockHeader const &header, Target target) const
 
void searchForJustification (std::ostream &out, BlockHeader const &header) const
 
void searchForAuthorityUpdate (std::ostream &out, BlockHeader const &header) const
 
void reportAuthorityUpdate (std::ostream &out, BlockNumber digest_origin, GrandpaDigest const &digest) const
 

Private Attributes

std::shared_ptr< BlockStorageblock_storage
 
std::shared_ptr< TrieStoragetrie_storage
 
std::shared_ptr< Hasherhasher
 

Additional Inherited Members

- Protected Member Functions inherited from Command
void assertArgumentCount (const ArgumentList &args, int min, int max)
 
template<typename... Ts>
void throwError (const char *fmt, Ts &&...ts) const
 
template<typename T >
unwrapResult (std::string_view context, outcome::result< T > &&res) const
 

Detailed Description

Definition at line 293 of file storage_explorer.cpp.

Member Enumeration Documentation

Enumerator
Justification 
AuthorityUpdate 
LastBlock 

Definition at line 313 of file storage_explorer.cpp.

Constructor & Destructor Documentation

SearchChainCommand::SearchChainCommand ( std::shared_ptr< BlockStorage block_storage,
std::shared_ptr< TrieStorage trie_storage,
std::shared_ptr< kagome::authority::AuthorityManager authority_manager,
std::shared_ptr< Hasher hasher 
)
inlineexplicit

Definition at line 295 of file storage_explorer.cpp.

Member Function Documentation

virtual void SearchChainCommand::execute ( std::ostream &  out,
const ArgumentList args 
)
inlineoverridevirtual

Implements Command.

Definition at line 315 of file storage_explorer.cpp.

Target SearchChainCommand::parseTarget ( const char *  arg) const
inlineprivate

Definition at line 376 of file storage_explorer.cpp.

void SearchChainCommand::reportAuthorityUpdate ( std::ostream &  out,
BlockNumber  digest_origin,
GrandpaDigest const &  digest 
) const
inlineprivate

Definition at line 423 of file storage_explorer.cpp.

void SearchChainCommand::searchBlock ( std::ostream &  out,
BlockHeader const &  header,
Target  target 
) const
inlineprivate

Definition at line 383 of file storage_explorer.cpp.

void SearchChainCommand::searchForAuthorityUpdate ( std::ostream &  out,
BlockHeader const &  header 
) const
inlineprivate

Definition at line 407 of file storage_explorer.cpp.

void SearchChainCommand::searchForJustification ( std::ostream &  out,
BlockHeader const &  header 
) const
inlineprivate

Definition at line 397 of file storage_explorer.cpp.

Member Data Documentation

std::shared_ptr<BlockStorage> SearchChainCommand::block_storage
private

Definition at line 459 of file storage_explorer.cpp.

std::shared_ptr<Hasher> SearchChainCommand::hasher
private

Definition at line 461 of file storage_explorer.cpp.

std::shared_ptr<TrieStorage> SearchChainCommand::trie_storage
private

Definition at line 460 of file storage_explorer.cpp.


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