hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
round.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_ROUND_HPP
7 #define IROHA_ROUND_HPP
8 
9 #include <cstddef>
10 #include <cstdint>
11 #include <string>
12 
13 #include <boost/operators.hpp>
14 
15 namespace iroha {
16  namespace consensus {
17 
21  using BlockRoundType = uint64_t;
22 
26  using RejectRoundType = uint32_t;
27 
31  struct Round : public boost::less_than_comparable<Round> {
34 
35  Round() = default;
36 
37  Round(BlockRoundType block_r, RejectRoundType reject_r);
38 
39  bool operator<(const Round &rhs) const;
40 
41  bool operator==(const Round &rhs) const;
42 
43  bool operator!=(const Round &rhs) const;
44 
45  std::string toString() const;
46  };
47 
52  public:
53  std::size_t operator()(const consensus::Round &val) const;
54  };
55 
56  } // namespace consensus
57 } // namespace iroha
58 
59 #endif // IROHA_ROUND_HPP
bool operator<(const Round &rhs) const
Definition: round.cpp:20
bool operator==(const Round &rhs) const
Definition: round.cpp:25
Definition: block_query.hpp:16
bool operator!=(const Round &rhs) const
Definition: round.cpp:30
uint32_t RejectRoundType
Definition: round.hpp:26
std::string toString() const
Definition: round.cpp:41
BlockRoundType block_round
Definition: round.hpp:32
RejectRoundType reject_round
Definition: round.hpp:33
uint64_t BlockRoundType
Definition: round.hpp:21
Definition: round.hpp:51
Definition: round.hpp:31