hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
supermajority_checker_impl.hpp
Go to the documentation of this file.
1 
18 #ifndef IROHA_SUPERMAJORITY_CHECKER_IMPL_HPP
19 #define IROHA_SUPERMAJORITY_CHECKER_IMPL_HPP
20 
22 
23 namespace iroha {
24  namespace consensus {
25  namespace yac {
27  public:
28  virtual ~SupermajorityCheckerImpl() = default;
29 
37  virtual bool hasSupermajority(
39  &signatures,
40  const std::vector<std::shared_ptr<shared_model::interface::Peer>>
41  &peers) const override;
42 
43  virtual bool checkSize(PeersNumberType current,
44  PeersNumberType all) const override;
45 
46  virtual bool peersSubset(
48  &signatures,
49  const std::vector<std::shared_ptr<shared_model::interface::Peer>>
50  &peers) const override;
51 
52  virtual bool hasReject(PeersNumberType frequent,
53  PeersNumberType voted,
54  PeersNumberType all) const override;
55  };
56  } // namespace yac
57  } // namespace consensus
58 } // namespace iroha
59 
60 #endif // IROHA_SUPERMAJORITY_CHECKER_IMPL_HPP
virtual bool peersSubset(const shared_model::interface::types::SignatureRangeType &signatures, const std::vector< std::shared_ptr< shared_model::interface::Peer >> &peers) const override
Definition: supermajority_checker_impl.cpp:45
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
Definition: block_query.hpp:16
virtual bool hasReject(PeersNumberType frequent, PeersNumberType voted, PeersNumberType all) const override
Definition: supermajority_checker_impl.cpp:58
size_t PeersNumberType
Type for number of peers in round.
Definition: yac_types.hpp:16
virtual bool hasSupermajority(const shared_model::interface::types::SignatureRangeType &signatures, const std::vector< std::shared_ptr< shared_model::interface::Peer >> &peers) const override
Definition: supermajority_checker_impl.cpp:28
virtual bool checkSize(PeersNumberType current, PeersNumberType all) const override
Definition: supermajority_checker_impl.cpp:36
Definition: supermajority_checker_impl.hpp:26
Definition: supermajority_checker.hpp:30