hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
yac_network_interface.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_YAC_NETWORK_INTERFACE_HPP
7 #define IROHA_YAC_NETWORK_INTERFACE_HPP
8 
9 #include <memory>
10 #include <optional>
11 #include <vector>
12 
14 
15 namespace shared_model::interface {
16  class Peer;
17 } // namespace shared_model::interface
18 
19 namespace iroha::consensus::yac {
20  struct VoteMessage;
21 
23  public:
28  virtual std::optional<Answer> onState(std::vector<VoteMessage> state) = 0;
29 
30  virtual ~YacNetworkNotifications() = default;
31  };
32 
33  class YacNetwork {
34  public:
40  virtual void sendState(const shared_model::interface::Peer &to,
41  const std::vector<VoteMessage> &state) = 0;
42 
44  virtual void stop() = 0;
45 
49  virtual ~YacNetwork() = default;
50  };
51 } // namespace iroha::consensus::yac
52 
53 #endif // IROHA_YAC_NETWORK_INTERFACE_HPP
Definition: yac_network_interface.hpp:33
Definition: peer.hpp:20
Definition: command_executor.hpp:14
Definition: yac_network_interface.hpp:22
Definition: cluster_order.hpp:16