hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
yac_gate.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_YAC_GATE_HPP
7 #define IROHA_YAC_GATE_HPP
8 
9 #include <optional>
10 
14 
15 namespace iroha::consensus {
16  struct Round;
17 }
18 
19 namespace iroha::consensus::yac {
20  class YacHash;
21  class ClusterOrdering;
22 
23  class YacGate : public network::ConsensusGate {};
24 
28  class HashGate {
29  public:
36  virtual void vote(
37  YacHash hash,
38  ClusterOrdering order,
39  std::optional<ClusterOrdering> alternative_order = std::nullopt) = 0;
40 
49  virtual std::optional<Answer> processRoundSwitch(
50  consensus::Round const &round,
52 
54  virtual void stop() = 0;
55 
56  virtual ~HashGate() = default;
57  };
58 } // namespace iroha::consensus::yac
59 
60 #endif // IROHA_YAC_GATE_HPP
virtual void stop()=0
Prevent any new outgoing network activity. Be passive.
Definition: cluster_order.hpp:20
Definition: yac_hash_provider.hpp:25
Definition: yac_gate.hpp:28
Definition: consensus_block_cache.hpp:18
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
Definition: yac_gate.hpp:23
Definition: consensus_gate.hpp:20
Definition: round.hpp:31
virtual void vote(const simulator::BlockCreatorEvent &event)=0
std::vector< std::shared_ptr< shared_model::interface::Peer > > PeerList
Type of peers collection.
Definition: types.hpp:95
Definition: cluster_order.hpp:16