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>
12 
13 namespace iroha {
14  namespace network {
15 
20  public:
26  virtual void onNewState(const shared_model::crypto::PublicKey &from,
27  MstState new_state) = 0;
28 
29  virtual ~MstTransportNotification() = default;
30  };
31 
36  class MstTransport {
37  public:
42  virtual void subscribe(
43  std::shared_ptr<MstTransportNotification> notification) = 0;
44 
50  virtual void sendState(const shared_model::interface::Peer &to,
51  const MstState &providing_state) = 0;
52 
53  virtual ~MstTransport() = default;
54  };
55  } // namespace network
56 } // namespace iroha
57 #endif // IROHA_MST_TRANSPORT_HPP
Definition: mst_transport.hpp:19
Definition: peer.hpp:18
Definition: mst_state.hpp:89
Definition: block_query.hpp:14
Definition: mst_transport.hpp:36
Definition: public_key.hpp:16
virtual void onNewState(const shared_model::crypto::PublicKey &from, MstState new_state)=0