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:
28  virtual rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>
30  shared_model::interface::types::PublicKeyHexStringView
31  peer_pubkey) = 0;
32 
40  virtual boost::optional<std::shared_ptr<shared_model::interface::Block>>
42  shared_model::interface::types::PublicKeyHexStringView peer_pubkey,
44 
45  virtual ~BlockLoader() = default;
46  };
47  } // namespace network
48 } // namespace iroha
49 
50 #endif // IROHA_BLOCK_LOADER_HPP
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:48
virtual rxcpp::observable< std::shared_ptr< shared_model::interface::Block > > retrieveBlocks(const shared_model::interface::types::HeightType height, shared_model::interface::types::PublicKeyHexStringView peer_pubkey)=0
Definition: block_loader.hpp:20
Definition: block_query.hpp:15
virtual boost::optional< std::shared_ptr< shared_model::interface::Block > > retrieveBlock(shared_model::interface::types::PublicKeyHexStringView peer_pubkey, shared_model::interface::types::HeightType block_height)=0
virtual ~BlockLoader()=default