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 {
12  namespace consensus {
13  namespace yac {
14 
15  namespace detail {
17  constexpr unsigned int kSupermajorityCheckerKfPlus1Cft = 2;
18  } // namespace detail
19 
22  public:
23  bool hasSupermajority(PeersNumberType current,
24  PeersNumberType all) const override;
25 
26  bool canHaveSupermajority(const VoteGroups &votes,
27  PeersNumberType all) const override;
28  };
29  } // namespace yac
30  } // namespace consensus
31 } // namespace iroha
32 
33 #endif // IROHA_SUPERMAJORITY_CHECKER_CFT_HPP
An implementation of CFT supermajority checker.
Definition: supermajority_checker_cft.hpp:21
Definition: block_query.hpp:14
boost::any_range< PeersNumberType, boost::forward_traversal_tag, const PeersNumberType, std::ptrdiff_t > VoteGroups
Definition: supermajority_checker.hpp:39
size_t PeersNumberType
Type for number of peers in round.
Definition: yac_types.hpp:16
constexpr unsigned int kSupermajorityCheckerKfPlus1Cft
The free parameter of Kf+1 consistency model for CFT.
Definition: supermajority_checker_cft.hpp:17
Definition: supermajority_checker.hpp:31