hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
supermajority_checker_kf1.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SUPERMAJORITY_CHECKER_KF1_HPP
7 #define IROHA_SUPERMAJORITY_CHECKER_KF1_HPP
8 
10 
11 namespace iroha {
12  namespace consensus {
13  namespace yac {
14 
29  PeersNumberType all,
30  unsigned int k) {
31  if (agreed > all) {
32  return false;
33  }
34  return agreed * k >= (k - 1) * (all - 1) + k;
35  }
36 
37  } // namespace yac
38  } // namespace consensus
39 } // namespace iroha
40 
41 #endif // IROHA_SUPERMAJORITY_CHECKER_KF1_HPP
Definition: block_query.hpp:14
bool checkKfPlus1Supermajority(PeersNumberType agreed, PeersNumberType all, unsigned int k)
Definition: supermajority_checker_kf1.hpp:28
size_t PeersNumberType
Type for number of peers in round.
Definition: yac_types.hpp:16