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.hpp>
11 
15 
16 namespace iroha {
17  namespace network {
21  class BlockLoader {
22  public:
29  virtual rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>
31  const shared_model::crypto::PublicKey &peer_pubkey) = 0;
32 
40  virtual boost::optional<std::shared_ptr<shared_model::interface::Block>>
42  const shared_model::crypto::PublicKey &peer_pubkey,
44 
45  virtual ~BlockLoader() = default;
46  };
47  } // namespace network
48 } // namespace iroha
49 
50 #endif // IROHA_BLOCK_LOADER_HPP
virtual rxcpp::observable< std::shared_ptr< shared_model::interface::Block > > retrieveBlocks(const shared_model::interface::types::HeightType height, const shared_model::crypto::PublicKey &peer_pubkey)=0
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:43
virtual boost::optional< std::shared_ptr< shared_model::interface::Block > > retrieveBlock(const shared_model::crypto::PublicKey &peer_pubkey, shared_model::interface::types::HeightType block_height)=0
Definition: block_loader.hpp:21
Definition: block_query.hpp:14
Definition: public_key.hpp:16
virtual ~BlockLoader()=default