hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
mst_transport.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MST_TRANSPORT_HPP
7 #define IROHA_MST_TRANSPORT_HPP
8 
9 #include <memory>
10 
11 #include <rxcpp/rx-observable-fwd.hpp>
14 
15 namespace iroha {
16 
17  class MstState;
18 
19  namespace network {
20 
25  public:
31  virtual void onNewState(
32  shared_model::interface::types::PublicKeyHexStringView from,
33  MstState &&new_state) = 0;
34 
35  virtual ~MstTransportNotification() = default;
36  };
37 
42  class MstTransport {
43  public:
48  virtual void subscribe(
49  std::shared_ptr<MstTransportNotification> notification) = 0;
50 
57  virtual rxcpp::observable<bool> sendState(
58  std::shared_ptr<shared_model::interface::Peer const> to,
59  MstState const &providing_state) = 0;
60 
61  virtual ~MstTransport() = default;
62  };
63  } // namespace network
64 } // namespace iroha
65 #endif // IROHA_MST_TRANSPORT_HPP
Definition: mst_transport.hpp:24
Definition: mst_state.hpp:76
Definition: block_query.hpp:15
Definition: mst_transport.hpp:42
virtual void onNewState(shared_model::interface::types::PublicKeyHexStringView from, MstState &&new_state)=0