Kagome
Polkadot Runtime Engine in C++17
|
#include <propagate_transactions_protocol.hpp>
Public Member Functions | |
PropagateTransactionsProtocol ()=delete | |
~PropagateTransactionsProtocol () override=default | |
PropagateTransactionsProtocol (libp2p::Host &host, const application::AppConfiguration &app_config, const application::ChainSpec &chain_spec, std::shared_ptr< consensus::babe::Babe > babe, std::shared_ptr< ExtrinsicObserver > extrinsic_observer, std::shared_ptr< StreamEngine > stream_engine, std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngine > extrinsic_events_engine, std::shared_ptr< subscription::ExtrinsicEventKeyRepository > ext_event_key_repo) | |
bool | start () override |
bool | stop () override |
const std::string & | protocolName () const override |
void | onIncomingStream (std::shared_ptr< Stream > stream) override |
void | newOutgoingStream (const PeerInfo &peer_info, std::function< void(outcome::result< std::shared_ptr< Stream >>)> &&cb) override |
void | propagateTransactions (gsl::span< const primitives::Transaction > txs) |
Public Member Functions inherited from kagome::network::ProtocolBase | |
ProtocolBase ()=default | |
ProtocolBase (ProtocolBase &&) noexcept=delete | |
ProtocolBase (const ProtocolBase &)=delete | |
virtual | ~ProtocolBase ()=default |
ProtocolBase & | operator= (ProtocolBase &&) noexcept=delete |
ProtocolBase & | operator= (ProtocolBase const &)=delete |
Private Types | |
enum | Direction { Direction::INCOMING, Direction::OUTGOING } |
Private Member Functions | |
void | readHandshake (std::shared_ptr< Stream > stream, Direction direction, std::function< void(outcome::result< void >)> &&cb) |
void | writeHandshake (std::shared_ptr< Stream > stream, Direction direction, std::function< void(outcome::result< void >)> &&cb) |
void | readPropagatedExtrinsics (std::shared_ptr< Stream > stream) |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Private Member Functions inherited from NonMovable | |
NonMovable (NonMovable &&)=delete | |
NonMovable & | operator= (NonMovable &&)=delete |
NonMovable ()=default | |
~NonMovable ()=default | |
Private Attributes | |
ProtocolBaseImpl | base_ |
const application::AppConfiguration & | app_config_ |
std::shared_ptr< consensus::babe::Babe > | babe_ |
std::shared_ptr< ExtrinsicObserver > | extrinsic_observer_ |
std::shared_ptr< StreamEngine > | stream_engine_ |
std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngine > | extrinsic_events_engine_ |
std::shared_ptr< subscription::ExtrinsicEventKeyRepository > | ext_event_key_repo_ |
metrics::RegistryPtr | metrics_registry_ = metrics::createRegistry() |
metrics::Counter * | metric_propagated_tx_counter_ |
Static Private Attributes | |
static const auto | kPropogateTransacionsProtocolName |
Definition at line 37 of file propagate_transactions_protocol.hpp.
|
strongprivate |
Enumerator | |
---|---|
INCOMING | |
OUTGOING |
Definition at line 74 of file propagate_transactions_protocol.hpp.
|
delete |
|
overridedefault |
kagome::network::PropagateTransactionsProtocol::PropagateTransactionsProtocol | ( | libp2p::Host & | host, |
const application::AppConfiguration & | app_config, | ||
const application::ChainSpec & | chain_spec, | ||
std::shared_ptr< consensus::babe::Babe > | babe, | ||
std::shared_ptr< ExtrinsicObserver > | extrinsic_observer, | ||
std::shared_ptr< StreamEngine > | stream_engine, | ||
std::shared_ptr< primitives::events::ExtrinsicSubscriptionEngine > | extrinsic_events_engine, | ||
std::shared_ptr< subscription::ExtrinsicEventKeyRepository > | ext_event_key_repo | ||
) |
Definition at line 22 of file propagate_transactions_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 108 of file propagate_transactions_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 64 of file propagate_transactions_protocol.cpp.
void kagome::network::PropagateTransactionsProtocol::propagateTransactions | ( | gsl::span< const primitives::Transaction > | txs | ) |
Definition at line 318 of file propagate_transactions_protocol.cpp.
|
inlineoverridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 61 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 179 of file propagate_transactions_protocol.cpp.
|
private |
Definition at line 267 of file propagate_transactions_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 56 of file propagate_transactions_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 60 of file propagate_transactions_protocol.cpp.
|
private |
Definition at line 221 of file propagate_transactions_protocol.cpp.
|
private |
Definition at line 88 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 89 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 87 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 95 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 93 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 90 of file propagate_transactions_protocol.hpp.
|
inlinestaticprivate |
Definition at line 85 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 99 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 98 of file propagate_transactions_protocol.hpp.
|
private |
Definition at line 91 of file propagate_transactions_protocol.hpp.