6 #ifndef IROHA_BLOCK_LOADER_IMPL_HPP 7 #define IROHA_BLOCK_LOADER_IMPL_HPP 11 #include <unordered_map> 16 #include "loader.grpc.pb.h" 21 template <
typename Service>
31 std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory,
32 std::shared_ptr<shared_model::proto::ProtoBlockFactory> factory,
34 std::unique_ptr<ClientFactory> client_factory);
37 rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>,
40 shared_model::interface::types::PublicKeyHexStringView
41 peer_pubkey)
override;
46 shared_model::interface::types::PublicKeyHexStringView peer_pubkey,
57 findPeer(shared_model::interface::types::PublicKeyHexStringView pubkey);
59 std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory_;
60 std::shared_ptr<shared_model::proto::ProtoBlockFactory> block_factory_;
61 std::shared_ptr<ClientFactory> client_factory_;
68 #endif // IROHA_BLOCK_LOADER_IMPL_HPP BlockLoaderImpl(std::shared_ptr< ametsuchi::PeerQueryFactory > peer_query_factory, std::shared_ptr< shared_model::proto::ProtoBlockFactory > factory, logger::LoggerPtr log, std::unique_ptr< ClientFactory > client_factory)
Definition: block_loader_impl.cpp:28
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:48
proto::Loader Service
Definition: block_loader_impl.hpp:26
Definition: result_fwd.hpp:27
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
iroha::expected::Result< std::unique_ptr< shared_model::interface::Block >, std::string > retrieveBlock(shared_model::interface::types::PublicKeyHexStringView peer_pubkey, shared_model::interface::types::HeightType block_height) override
Definition: block_loader_impl.cpp:80
Definition: block_loader.hpp:20
iroha::expected::Result< rxcpp::observable< std::shared_ptr< shared_model::interface::Block > >, std::string > retrieveBlocks(const shared_model::interface::types::HeightType height, shared_model::interface::types::PublicKeyHexStringView peer_pubkey) override
Definition: block_loader_impl.cpp:39
Definition: block_query.hpp:15
Definition: block_loader_impl.hpp:24
Definition: mst_transport_grpc.hpp:29