Kagome
Polkadot Runtime Engine in C++17
|
#include <block_announce_protocol.hpp>
Public Member Functions | |
BlockAnnounceProtocol ()=delete | |
~BlockAnnounceProtocol () override=default | |
BlockAnnounceProtocol (libp2p::Host &host, const application::AppConfiguration &app_config, const application::ChainSpec &chain_spec, std::shared_ptr< StreamEngine > stream_engine, std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< BlockAnnounceObserver > observer, std::shared_ptr< PeerManager > peer_manager) | |
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 | blockAnnounce (BlockAnnounce &&announce) |
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 | |
outcome::result< Status > | createStatus () const |
void | readStatus (std::shared_ptr< Stream > stream, Direction direction, std::function< void(outcome::result< void >)> &&cb) |
void | writeStatus (std::shared_ptr< Stream > stream, Direction direction, std::function< void(outcome::result< void >)> &&cb) |
void | readAnnounce (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< StreamEngine > | stream_engine_ |
std::shared_ptr< blockchain::BlockTree > | block_tree_ |
std::shared_ptr< BlockAnnounceObserver > | observer_ |
std::shared_ptr< PeerManager > | peer_manager_ |
Static Private Attributes | |
static const auto | kBlockAnnounceProtocolName |
Definition at line 35 of file block_announce_protocol.hpp.
|
strongprivate |
Enumerator | |
---|---|
INCOMING | |
OUTGOING |
Definition at line 70 of file block_announce_protocol.hpp.
|
delete |
|
overridedefault |
kagome::network::BlockAnnounceProtocol::BlockAnnounceProtocol | ( | libp2p::Host & | host, |
const application::AppConfiguration & | app_config, | ||
const application::ChainSpec & | chain_spec, | ||
std::shared_ptr< StreamEngine > | stream_engine, | ||
std::shared_ptr< blockchain::BlockTree > | block_tree, | ||
std::shared_ptr< BlockAnnounceObserver > | observer, | ||
std::shared_ptr< PeerManager > | peer_manager | ||
) |
Definition at line 18 of file block_announce_protocol.cpp.
void kagome::network::BlockAnnounceProtocol::blockAnnounce | ( | BlockAnnounce && | announce | ) |
Definition at line 352 of file block_announce_protocol.cpp.
|
private |
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 118 of file block_announce_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 72 of file block_announce_protocol.cpp.
|
inlineoverridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 55 of file block_announce_protocol.hpp.
|
private |
Definition at line 312 of file block_announce_protocol.cpp.
|
private |
Definition at line 195 of file block_announce_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 41 of file block_announce_protocol.cpp.
|
overridevirtual |
Implements kagome::network::ProtocolBase.
Definition at line 45 of file block_announce_protocol.cpp.
|
private |
Definition at line 257 of file block_announce_protocol.cpp.
|
private |
Definition at line 84 of file block_announce_protocol.hpp.
|
private |
Definition at line 83 of file block_announce_protocol.hpp.
|
private |
Definition at line 86 of file block_announce_protocol.hpp.
|
inlinestaticprivate |
Definition at line 81 of file block_announce_protocol.hpp.
|
private |
Definition at line 87 of file block_announce_protocol.hpp.
|
private |
Definition at line 88 of file block_announce_protocol.hpp.
|
private |
Definition at line 85 of file block_announce_protocol.hpp.