hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_BLOCK_HPP
7 #define IROHA_BLOCK_HPP
8 
9 #include <vector>
10 
11 #include "crypto/hash_types.hpp"
12 #include "model/proposal.hpp"
13 #include "model/signature.hpp"
14 #include "model/transaction.hpp"
15 
16 namespace iroha {
17  namespace model {
18 
24  struct Block {
30 
31  using HashType = decltype(hash);
32 
37  std::vector<Signature> sigs;
38 
39  using SignaturesType = decltype(sigs);
40 
46 
52  uint64_t height{};
53 
54  using BlockHeightType = decltype(height);
55 
61 
66  uint16_t txs_number{};
67 
72  std::vector<Transaction> transactions;
73 
74  using TransactionsType = decltype(transactions);
75 
80  std::vector<HashType> rejected_transactions_hashes;
81 
82  using RejectedTransactionsType = decltype(rejected_transactions_hashes);
83 
84  bool operator==(const Block &rhs) const;
85  bool operator!=(const Block &rhs) const;
86  };
87  } // namespace model
88 } // namespace iroha
89 
90 #endif // IROHA_BLOCK_HPP
std::vector< Signature > sigs
Definition: block.hpp:37
decltype(rejected_transactions_hashes) RejectedTransactionsType
Definition: block.hpp:82
uint64_t ts64_t
Definition: time.hpp:14
uint16_t txs_number
Definition: block.hpp:66
std::vector< HashType > rejected_transactions_hashes
Definition: block.hpp:80
hash256_t hash
Definition: block.hpp:29
std::vector< Transaction > transactions
Definition: block.hpp:72
Definition: block_query.hpp:16
uint64_t height
Definition: block.hpp:52
decltype(hash) HashType
Definition: block.hpp:31
ts64_t created_ts
Definition: block.hpp:45
bool operator==(const Block &rhs) const
Definition: model_operators.cpp:214
decltype(sigs) SignaturesType
Definition: block.hpp:39
Definition: blob.hpp:49
decltype(height) BlockHeightType
Definition: block.hpp:54
decltype(transactions) TransactionsType
Definition: block.hpp:74
bool operator!=(const Block &rhs) const
Definition: model_operators.cpp:34
hash256_t prev_hash
Definition: block.hpp:60
Definition: block.hpp:24