6 #ifndef KAGOME_SYNC_PROTOCOL_OBSERVER_IMPL 7 #define KAGOME_SYNC_PROTOCOL_OBSERVER_IMPL 11 #include <libp2p/host/host.hpp> 12 #include <libp2p/peer/peer_info.hpp> 24 public std::enable_shared_from_this<SyncProtocolObserverImpl> {
29 std::shared_ptr<blockchain::BlockTree> block_tree,
30 std::shared_ptr<blockchain::BlockHeaderRepository> blocks_headers);
45 const std::vector<primitives::BlockHash> &hash_chain)
const;
59 #endif // KAGOME_SYNC_PROTOCOL_OBSERVER_IMPL blockchain::BlockTree::BlockHashVecRes retrieveRequestedHashes(const network::BlocksRequest &request, const primitives::BlockHash &from_hash) const
~SyncProtocolObserverImpl() override=default
std::shared_ptr< blockchain::BlockTree > block_tree_
std::shared_ptr< soralog::Logger > Logger
outcome::result< std::vector< primitives::BlockHash >> BlockHashVecRes
outcome::result< BlocksResponse > onBlocksRequest(const BlocksRequest &request) const override
SyncProtocolObserverImpl(std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< blockchain::BlockHeaderRepository > blocks_headers)
std::unordered_set< BlocksRequest::Fingerprint > requested_ids_
OUTCOME_HPP_DECLARE_ERROR(kagome::network, SyncProtocolObserverImpl::Error)
void fillBlocksResponse(const network::BlocksRequest &request, network::BlocksResponse &response, const std::vector< primitives::BlockHash > &hash_chain) const
std::shared_ptr< blockchain::BlockHeaderRepository > blocks_headers_