Kagome
Polkadot Runtime Engine in C++17
kagome::observers::CollationObserverImpl Struct Reference
Inheritance diagram for kagome::observers::CollationObserverImpl:
Collaboration diagram for kagome::observers::CollationObserverImpl:

Public Member Functions

 CollationObserverImpl (std::shared_ptr< network::PeerManager > pm, std::shared_ptr< crypto::Sr25519Provider > crypto_provider, std::shared_ptr< parachain::ParachainProcessorImpl > processor)
 
 ~CollationObserverImpl () override=default
 
void onAdvertise (libp2p::peer::PeerId const &peer_id, primitives::BlockHash relay_parent) override
 
void onDeclare (libp2p::peer::PeerId const &peer_id, network::CollatorPublicKey pubkey, network::ParachainId para_id, network::Signature signature) override
 
- Public Member Functions inherited from kagome::network::CollationObserver
virtual ~CollationObserver ()=default
 

Private Attributes

std::shared_ptr< network::PeerManagerpm_
 
std::shared_ptr< crypto::Sr25519Providercrypto_provider_
 
std::shared_ptr< parachain::ParachainProcessorImplprocessor_
 
log::Logger logger_ = log::createLogger("CollationObserver", "parachain")
 

Detailed Description

Definition at line 19 of file parachain_observer.cpp.

Constructor & Destructor Documentation

kagome::observers::CollationObserverImpl::CollationObserverImpl ( std::shared_ptr< network::PeerManager pm,
std::shared_ptr< crypto::Sr25519Provider crypto_provider,
std::shared_ptr< parachain::ParachainProcessorImpl processor 
)
inline

Definition at line 20 of file parachain_observer.cpp.

kagome::observers::CollationObserverImpl::~CollationObserverImpl ( )
overridedefault

Member Function Documentation

void kagome::observers::CollationObserverImpl::onAdvertise ( libp2p::peer::PeerId const &  peer_id,
primitives::BlockHash  para_hash 
)
inlineoverridevirtual

Triggered when a Peer makes advertisement

Parameters
peer_idid of the peer
para_hashhash of the parachain block

Implements kagome::network::CollationObserver.

Definition at line 34 of file parachain_observer.cpp.

void kagome::observers::CollationObserverImpl::onDeclare ( libp2p::peer::PeerId const &  peer_id,
network::CollatorPublicKey  pubkey,
network::ParachainId  para_id,
network::Signature  signature 
)
inlineoverridevirtual

Triggered when a Peer declares as a collator

Copy because verify works with non-constant value.

need to set active paras based on ViewChanged events.

Implements kagome::network::CollationObserver.

Definition at line 67 of file parachain_observer.cpp.

Member Data Documentation

std::shared_ptr<crypto::Sr25519Provider> kagome::observers::CollationObserverImpl::crypto_provider_
private

Definition at line 103 of file parachain_observer.cpp.

log::Logger kagome::observers::CollationObserverImpl::logger_ = log::createLogger("CollationObserver", "parachain")
private

Definition at line 105 of file parachain_observer.cpp.

std::shared_ptr<network::PeerManager> kagome::observers::CollationObserverImpl::pm_
private

Definition at line 102 of file parachain_observer.cpp.

std::shared_ptr<parachain::ParachainProcessorImpl> kagome::observers::CollationObserverImpl::processor_
private

Definition at line 104 of file parachain_observer.cpp.


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