Kagome
Polkadot Runtime Engine in C++17
kagome::authority_discovery::AddressPublisher Class Reference

#include <address_publisher.hpp>

Inheritance diagram for kagome::authority_discovery::AddressPublisher:
Collaboration diagram for kagome::authority_discovery::AddressPublisher:

Public Member Functions

 AddressPublisher (std::shared_ptr< runtime::AuthorityDiscoveryApi > authority_discovery_api, network::Roles roles, std::shared_ptr< application::AppStateManager > app_state_manager, std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< crypto::SessionKeys > keys, const libp2p::crypto::KeyPair &libp2p_key, const libp2p::crypto::marshaller::KeyMarshaller &key_marshaller, std::shared_ptr< crypto::Ed25519Provider > ed_crypto_provider, std::shared_ptr< crypto::Sr25519Provider > sr_crypto_provider, libp2p::Host &host, std::shared_ptr< libp2p::protocol::kademlia::Kademlia > kademlia, std::shared_ptr< libp2p::basic::Scheduler > scheduler)
 
bool start ()
 
outcome::result< void > publishOwnAddress ()
 

Private Attributes

std::shared_ptr< runtime::AuthorityDiscoveryApiauthority_discovery_api_
 
network::Roles roles_
 
std::shared_ptr< blockchain::BlockTreeblock_tree_
 
std::shared_ptr< crypto::SessionKeyskeys_
 
std::shared_ptr< crypto::Ed25519Providered_crypto_provider_
 
std::shared_ptr< crypto::Sr25519Providersr_crypto_provider_
 
libp2p::Host & host_
 
std::shared_ptr< libp2p::protocol::kademlia::Kademlia > kademlia_
 
std::shared_ptr< libp2p::basic::Scheduler > scheduler_
 
log::Logger log_
 
std::optional< crypto::Ed25519Keypairlibp2p_key_
 
std::optional< libp2p::crypto::ProtobufKey > libp2p_key_pb_
 

Detailed Description

Publishes listening addresses for authority discovery. Authority discovery public key is used for Kademlia DHT key.

Definition at line 27 of file address_publisher.hpp.

Constructor & Destructor Documentation

kagome::authority_discovery::AddressPublisher::AddressPublisher ( std::shared_ptr< runtime::AuthorityDiscoveryApi authority_discovery_api,
network::Roles  roles,
std::shared_ptr< application::AppStateManager app_state_manager,
std::shared_ptr< blockchain::BlockTree block_tree,
std::shared_ptr< crypto::SessionKeys keys,
const libp2p::crypto::KeyPair &  libp2p_key,
const libp2p::crypto::marshaller::KeyMarshaller &  key_marshaller,
std::shared_ptr< crypto::Ed25519Provider ed_crypto_provider,
std::shared_ptr< crypto::Sr25519Provider sr_crypto_provider,
libp2p::Host &  host,
std::shared_ptr< libp2p::protocol::kademlia::Kademlia >  kademlia,
std::shared_ptr< libp2p::basic::Scheduler >  scheduler 
)

Definition at line 24 of file address_publisher.cpp.

Member Function Documentation

outcome::result< void > kagome::authority_discovery::AddressPublisher::publishOwnAddress ( )

Definition at line 87 of file address_publisher.cpp.

bool kagome::authority_discovery::AddressPublisher::start ( )

Definition at line 72 of file address_publisher.cpp.

Member Data Documentation

std::shared_ptr<runtime::AuthorityDiscoveryApi> kagome::authority_discovery::AddressPublisher::authority_discovery_api_
private

Definition at line 49 of file address_publisher.hpp.

std::shared_ptr<blockchain::BlockTree> kagome::authority_discovery::AddressPublisher::block_tree_
private

Definition at line 51 of file address_publisher.hpp.

std::shared_ptr<crypto::Ed25519Provider> kagome::authority_discovery::AddressPublisher::ed_crypto_provider_
private

Definition at line 55 of file address_publisher.hpp.

libp2p::Host& kagome::authority_discovery::AddressPublisher::host_
private

Definition at line 58 of file address_publisher.hpp.

std::shared_ptr<libp2p::protocol::kademlia::Kademlia> kagome::authority_discovery::AddressPublisher::kademlia_
private

Definition at line 59 of file address_publisher.hpp.

std::shared_ptr<crypto::SessionKeys> kagome::authority_discovery::AddressPublisher::keys_
private

Definition at line 53 of file address_publisher.hpp.

std::optional<crypto::Ed25519Keypair> kagome::authority_discovery::AddressPublisher::libp2p_key_
private

Definition at line 65 of file address_publisher.hpp.

std::optional<libp2p::crypto::ProtobufKey> kagome::authority_discovery::AddressPublisher::libp2p_key_pb_
private

Definition at line 66 of file address_publisher.hpp.

log::Logger kagome::authority_discovery::AddressPublisher::log_
private

Definition at line 63 of file address_publisher.hpp.

network::Roles kagome::authority_discovery::AddressPublisher::roles_
private

Definition at line 50 of file address_publisher.hpp.

std::shared_ptr<libp2p::basic::Scheduler> kagome::authority_discovery::AddressPublisher::scheduler_
private

Definition at line 61 of file address_publisher.hpp.

std::shared_ptr<crypto::Sr25519Provider> kagome::authority_discovery::AddressPublisher::sr_crypto_provider_
private

Definition at line 56 of file address_publisher.hpp.


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