hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
yac_common.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_YAC_COMMON_HPP
7 #define IROHA_YAC_COMMON_HPP
8 
9 #include <vector>
10 
11 #include <boost/optional.hpp>
12 
13 #include "consensus/round.hpp"
14 
15 namespace iroha {
16  namespace consensus {
17  namespace yac {
18 
19  class YacHash;
20  struct VoteMessage;
21 
22  using ProposalHash = std::string;
23 
24  using BlockHash = std::string;
25 
31  bool sameKeys(const std::vector<VoteMessage> &votes);
32 
39  boost::optional<Round> getKey(const std::vector<VoteMessage> &votes);
40 
47  boost::optional<YacHash> getHash(const std::vector<VoteMessage> &votes);
48 
49  } // namespace yac
50  } // namespace consensus
51 } // namespace iroha
52 
53 #endif // IROHA_YAC_COMMON_HPP
boost::optional< YacHash > getHash(const std::vector< VoteMessage > &votes)
Definition: yac_common.cpp:35
boost::optional< Round > getKey(const std::vector< VoteMessage > &votes)
Definition: yac_common.cpp:28
std::string ProposalHash
Definition: yac_common.hpp:22
bool sameKeys(const std::vector< VoteMessage > &votes)
Definition: yac_common.cpp:16
Definition: block_query.hpp:16
std::string BlockHash
Definition: yac_common.hpp:24