Kagome
Polkadot Runtime Engine in C++17
|
#include <sync_protocol_observer_impl.hpp>
Public Types | |
enum | Error { Error::DUPLICATE_REQUEST_ID = 1 } |
Public Member Functions | |
SyncProtocolObserverImpl (std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< blockchain::BlockHeaderRepository > blocks_headers) | |
~SyncProtocolObserverImpl () override=default | |
outcome::result< BlocksResponse > | onBlocksRequest (const BlocksRequest &request) const override |
Public Member Functions inherited from kagome::network::SyncProtocolObserver | |
virtual | ~SyncProtocolObserver ()=default |
Private Member Functions | |
blockchain::BlockTree::BlockHashVecRes | retrieveRequestedHashes (const network::BlocksRequest &request, const primitives::BlockHash &from_hash) const |
void | fillBlocksResponse (const network::BlocksRequest &request, network::BlocksResponse &response, const std::vector< primitives::BlockHash > &hash_chain) const |
Private Attributes | |
std::shared_ptr< blockchain::BlockTree > | block_tree_ |
std::shared_ptr< blockchain::BlockHeaderRepository > | blocks_headers_ |
std::unordered_set< BlocksRequest::Fingerprint > | requested_ids_ |
log::Logger | log_ |
Definition at line 22 of file sync_protocol_observer_impl.hpp.
|
strong |
Enumerator | |
---|---|
DUPLICATE_REQUEST_ID |
Definition at line 26 of file sync_protocol_observer_impl.hpp.
kagome::network::SyncProtocolObserverImpl::SyncProtocolObserverImpl | ( | std::shared_ptr< blockchain::BlockTree > | block_tree, |
std::shared_ptr< blockchain::BlockHeaderRepository > | blocks_headers | ||
) |
Definition at line 28 of file sync_protocol_observer_impl.cpp.
|
overridedefault |
|
private |
Definition at line 147 of file sync_protocol_observer_impl.cpp.
|
overridevirtual |
Process a blocks request
request | to be processed |
Implements kagome::network::SyncProtocolObserver.
Definition at line 39 of file sync_protocol_observer_impl.cpp.
|
private |
Definition at line 110 of file sync_protocol_observer_impl.cpp.
|
private |
Definition at line 47 of file sync_protocol_observer_impl.hpp.
|
private |
Definition at line 48 of file sync_protocol_observer_impl.hpp.
|
private |
Definition at line 52 of file sync_protocol_observer_impl.hpp.
|
mutableprivate |
Definition at line 50 of file sync_protocol_observer_impl.hpp.