hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
supermajority_checker_bft.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SUPERMAJORITY_CHECKER_BFT_HPP
7 #define IROHA_SUPERMAJORITY_CHECKER_BFT_HPP
8 
10 
11 namespace iroha::consensus::yac {
12  namespace detail {
14  constexpr unsigned int kSupermajorityCheckerKfPlus1Bft = 3;
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_BFT_HPP
constexpr unsigned int kSupermajorityCheckerKfPlus1Bft
The free parameter of Kf+1 consistency model for BFT.
Definition: supermajority_checker_bft.hpp:14
An implementation of BFT supermajority checker.
Definition: supermajority_checker_bft.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
Definition: supermajority_checker.hpp:26
Definition: cluster_order.hpp:16