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 {
12  namespace consensus {
13  namespace yac {
14 
15  namespace detail {
17  constexpr unsigned int kSupermajorityCheckerKfPlus1Bft = 3;
18  }
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_BFT_HPP
constexpr unsigned int kSupermajorityCheckerKfPlus1Bft
The free parameter of Kf+1 consistency model for BFT.
Definition: supermajority_checker_bft.hpp:17
An implementation of BFT supermajority checker.
Definition: supermajority_checker_bft.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
Definition: supermajority_checker.hpp:31