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