hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
supermajority_checker_cft.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SUPERMAJORITY_CHECKER_CFT_HPP
7 #define IROHA_SUPERMAJORITY_CHECKER_CFT_HPP
8 
10 
11 namespace iroha::consensus::yac {
12  namespace detail {
14  constexpr unsigned int kSupermajorityCheckerKfPlus1Cft = 2;
15  } // namespace detail
16 
19  public:
20  bool hasSupermajority(PeersNumberType current,
21  PeersNumberType all) const override;
22 
23  bool isTolerated(PeersNumberType number,
24  PeersNumberType all) const override;
25 
26  bool canHaveSupermajority(const VoteGroups &votes,
27  PeersNumberType all) const override;
28  };
29 } // namespace iroha::consensus::yac
30 
31 #endif // IROHA_SUPERMAJORITY_CHECKER_CFT_HPP
An implementation of CFT supermajority checker.
Definition: supermajority_checker_cft.hpp:18
boost::any_range< PeersNumberType, boost::forward_traversal_tag, const PeersNumberType, std::ptrdiff_t > VoteGroups
Definition: supermajority_checker.hpp:34
size_t PeersNumberType
Type for number of peers in round.
Definition: yac_types.hpp:13
constexpr unsigned int kSupermajorityCheckerKfPlus1Cft
The free parameter of Kf+1 consistency model for CFT.
Definition: supermajority_checker_cft.hpp:14
Definition: supermajority_checker.hpp:26
Definition: cluster_order.hpp:16