hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_loader.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_BLOCK_LOADER_HPP
7 #define IROHA_BLOCK_LOADER_HPP
8 
9 #include <memory>
10 #include <rxcpp/rx-observable-fwd.hpp>
11 
14 
15 namespace iroha {
16  namespace network {
20  class BlockLoader {
21  public:
29  rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>,
30  std::string>
32  shared_model::interface::types::PublicKeyHexStringView
33  peer_pubkey) = 0;
34 
43  std::unique_ptr<shared_model::interface::Block>,
44  std::string>
46  shared_model::interface::types::PublicKeyHexStringView peer_pubkey,
48 
49  virtual ~BlockLoader() = default;
50  };
51  } // namespace network
52 } // namespace iroha
53 
54 #endif // IROHA_BLOCK_LOADER_HPP
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:48
virtual 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)=0
Definition: result_fwd.hpp:27
Definition: block_loader.hpp:20
Definition: block_query.hpp:15
virtual 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)=0
virtual ~BlockLoader()=default