Kagome
Polkadot Runtime Engine in C++17
kagome::network::ProtocolFactory Class Referencefinal

#include <protocol_factory.hpp>

Collaboration diagram for kagome::network::ProtocolFactory:

Public Member Functions

 ProtocolFactory (libp2p::Host &host, const application::AppConfiguration &app_config, const application::ChainSpec &chain_spec, const OwnPeerInfo &own_info, std::shared_ptr< boost::asio::io_context > io_context, std::shared_ptr< crypto::Hasher > hasher, std::shared_ptr< StreamEngine > stream_engine, std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngine > extrinsic_events_engine, std::shared_ptr< subscription::ExtrinsicEventKeyRepository > ext_event_key_repo, std::shared_ptr< ReputationRepository > reputation_repository, std::shared_ptr< libp2p::basic::Scheduler > scheduler)
 
void setBlockTree (const std::shared_ptr< blockchain::BlockTree > &block_tree)
 
void setBabe (const std::shared_ptr< consensus::babe::Babe > &babe)
 
void setGrandpaObserver (const std::shared_ptr< consensus::grandpa::GrandpaObserver > &grandpa_observer)
 
void setExtrinsicObserver (const std::shared_ptr< ExtrinsicObserver > &extrinsic_observer)
 
void setCollactionObserver (std::shared_ptr< CollationObserver > const &collation_observer)
 
void setStateObserver (const std::shared_ptr< StateProtocolObserver > &state_observer)
 
void setReqCollationObserver (std::shared_ptr< ReqCollationObserver > const &req_collation_observer)
 
void setSyncObserver (const std::shared_ptr< SyncProtocolObserver > &sync_observer)
 
void setPeerManager (const std::shared_ptr< PeerManager > &peer_manager)
 
std::shared_ptr< BlockAnnounceProtocolmakeBlockAnnounceProtocol () const
 
std::shared_ptr< GrandpaProtocolmakeGrandpaProtocol () const
 
std::shared_ptr< PropagateTransactionsProtocolmakePropagateTransactionsProtocol () const
 
std::shared_ptr< StateProtocolmakeStateProtocol () const
 
std::shared_ptr< SyncProtocolmakeSyncProtocol () const
 
std::shared_ptr< CollationProtocolmakeCollationProtocol () const
 
std::shared_ptr< ReqCollationProtocolmakeReqCollationProtocol () const
 

Private Attributes

libp2p::Host & host_
 
const application::AppConfigurationapp_config_
 
const application::ChainSpecchain_spec_
 
const OwnPeerInfoown_info_
 
std::shared_ptr< boost::asio::io_context > io_context_
 
std::shared_ptr< crypto::Hasherhasher_
 
std::shared_ptr< StreamEnginestream_engine_
 
std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngineextrinsic_events_engine_
 
std::shared_ptr< subscription::ExtrinsicEventKeyRepositoryext_event_key_repo_
 
std::shared_ptr< ReputationRepositoryreputation_repository_
 
std::shared_ptr< libp2p::basic::Scheduler > scheduler_
 
std::weak_ptr< blockchain::BlockTreeblock_tree_
 
std::weak_ptr< consensus::babe::Babebabe_
 
std::weak_ptr< consensus::grandpa::GrandpaObservergrandpa_observer_
 
std::weak_ptr< ExtrinsicObserverextrinsic_observer_
 
std::weak_ptr< StateProtocolObserverstate_observer_
 
std::weak_ptr< SyncProtocolObserversync_observer_
 
std::weak_ptr< PeerManagerpeer_manager_
 
std::weak_ptr< CollationObservercollation_observer_
 
std::weak_ptr< ReqCollationObserverreq_collation_observer_
 

Detailed Description

Definition at line 27 of file protocol_factory.hpp.

Constructor & Destructor Documentation

kagome::network::ProtocolFactory::ProtocolFactory ( libp2p::Host &  host,
const application::AppConfiguration app_config,
const application::ChainSpec chain_spec,
const OwnPeerInfo own_info,
std::shared_ptr< boost::asio::io_context >  io_context,
std::shared_ptr< crypto::Hasher hasher,
std::shared_ptr< StreamEngine stream_engine,
std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngine extrinsic_events_engine,
std::shared_ptr< subscription::ExtrinsicEventKeyRepository ext_event_key_repo,
std::shared_ptr< ReputationRepository reputation_repository,
std::shared_ptr< libp2p::basic::Scheduler >  scheduler 
)

Definition at line 11 of file protocol_factory.cpp.

Member Function Documentation

std::shared_ptr< BlockAnnounceProtocol > kagome::network::ProtocolFactory::makeBlockAnnounceProtocol ( ) const

Definition at line 46 of file protocol_factory.cpp.

std::shared_ptr< CollationProtocol > kagome::network::ProtocolFactory::makeCollationProtocol ( ) const

Definition at line 73 of file protocol_factory.cpp.

std::shared_ptr< GrandpaProtocol > kagome::network::ProtocolFactory::makeGrandpaProtocol ( ) const

Definition at line 56 of file protocol_factory.cpp.

std::shared_ptr< PropagateTransactionsProtocol > kagome::network::ProtocolFactory::makePropagateTransactionsProtocol ( ) const

Definition at line 86 of file protocol_factory.cpp.

std::shared_ptr< ReqCollationProtocol > kagome::network::ProtocolFactory::makeReqCollationProtocol ( ) const

Definition at line 80 of file protocol_factory.cpp.

std::shared_ptr< StateProtocol > kagome::network::ProtocolFactory::makeStateProtocol ( ) const

Definition at line 98 of file protocol_factory.cpp.

std::shared_ptr< SyncProtocol > kagome::network::ProtocolFactory::makeSyncProtocol ( ) const

Definition at line 103 of file protocol_factory.cpp.

void kagome::network::ProtocolFactory::setBabe ( const std::shared_ptr< consensus::babe::Babe > &  babe)
inline

Definition at line 49 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setBlockTree ( const std::shared_ptr< blockchain::BlockTree > &  block_tree)
inline

Definition at line 44 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setCollactionObserver ( std::shared_ptr< CollationObserver > const &  collation_observer)
inline

Definition at line 64 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setExtrinsicObserver ( const std::shared_ptr< ExtrinsicObserver > &  extrinsic_observer)
inline

Definition at line 59 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setGrandpaObserver ( const std::shared_ptr< consensus::grandpa::GrandpaObserver > &  grandpa_observer)
inline

Definition at line 53 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setPeerManager ( const std::shared_ptr< PeerManager > &  peer_manager)
inline

Definition at line 84 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setReqCollationObserver ( std::shared_ptr< ReqCollationObserver > const &  req_collation_observer)
inline

Definition at line 74 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setStateObserver ( const std::shared_ptr< StateProtocolObserver > &  state_observer)
inline

Definition at line 69 of file protocol_factory.hpp.

void kagome::network::ProtocolFactory::setSyncObserver ( const std::shared_ptr< SyncProtocolObserver > &  sync_observer)
inline

Definition at line 79 of file protocol_factory.hpp.

Member Data Documentation

const application::AppConfiguration& kagome::network::ProtocolFactory::app_config_
private

Definition at line 103 of file protocol_factory.hpp.

std::weak_ptr<consensus::babe::Babe> kagome::network::ProtocolFactory::babe_
private

Definition at line 117 of file protocol_factory.hpp.

std::weak_ptr<blockchain::BlockTree> kagome::network::ProtocolFactory::block_tree_
private

Definition at line 116 of file protocol_factory.hpp.

const application::ChainSpec& kagome::network::ProtocolFactory::chain_spec_
private

Definition at line 104 of file protocol_factory.hpp.

std::weak_ptr<CollationObserver> kagome::network::ProtocolFactory::collation_observer_
private

Definition at line 123 of file protocol_factory.hpp.

std::shared_ptr<subscription::ExtrinsicEventKeyRepository> kagome::network::ProtocolFactory::ext_event_key_repo_
private

Definition at line 112 of file protocol_factory.hpp.

std::shared_ptr<primitives::events::ExtrinsicSubscriptionEngine> kagome::network::ProtocolFactory::extrinsic_events_engine_
private

Definition at line 110 of file protocol_factory.hpp.

std::weak_ptr<ExtrinsicObserver> kagome::network::ProtocolFactory::extrinsic_observer_
private

Definition at line 119 of file protocol_factory.hpp.

std::weak_ptr<consensus::grandpa::GrandpaObserver> kagome::network::ProtocolFactory::grandpa_observer_
private

Definition at line 118 of file protocol_factory.hpp.

std::shared_ptr<crypto::Hasher> kagome::network::ProtocolFactory::hasher_
private

Definition at line 107 of file protocol_factory.hpp.

libp2p::Host& kagome::network::ProtocolFactory::host_
private

Definition at line 102 of file protocol_factory.hpp.

std::shared_ptr<boost::asio::io_context> kagome::network::ProtocolFactory::io_context_
private

Definition at line 106 of file protocol_factory.hpp.

const OwnPeerInfo& kagome::network::ProtocolFactory::own_info_
private

Definition at line 105 of file protocol_factory.hpp.

std::weak_ptr<PeerManager> kagome::network::ProtocolFactory::peer_manager_
private

Definition at line 122 of file protocol_factory.hpp.

std::shared_ptr<ReputationRepository> kagome::network::ProtocolFactory::reputation_repository_
private

Definition at line 113 of file protocol_factory.hpp.

std::weak_ptr<ReqCollationObserver> kagome::network::ProtocolFactory::req_collation_observer_
private

Definition at line 124 of file protocol_factory.hpp.

std::shared_ptr<libp2p::basic::Scheduler> kagome::network::ProtocolFactory::scheduler_
private

Definition at line 114 of file protocol_factory.hpp.

std::weak_ptr<StateProtocolObserver> kagome::network::ProtocolFactory::state_observer_
private

Definition at line 120 of file protocol_factory.hpp.

std::shared_ptr<StreamEngine> kagome::network::ProtocolFactory::stream_engine_
private

Definition at line 108 of file protocol_factory.hpp.

std::weak_ptr<SyncProtocolObserver> kagome::network::ProtocolFactory::sync_observer_
private

Definition at line 121 of file protocol_factory.hpp.


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