hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
pending_transactions_page_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PENDING_TRANSACTIONS_PAGE_RESPONSE_HPP
7 #define IROHA_SHARED_MODEL_PENDING_TRANSACTIONS_PAGE_RESPONSE_HPP
8 
10 
11 #include <boost/optional/optional_fwd.hpp>
12 #include "cryptography/hash.hpp"
15 
16 namespace shared_model {
17  namespace interface {
18 
23  : public ModelPrimitive<PendingTransactionsPageResponse> {
24  public:
25  // TODO igor-egorov 2019-06-29 IR-570 Convert BatchInfo to a shared model
26  // object
27  struct BatchInfo {
30 
31  bool operator==(const BatchInfo &rhs) const {
32  return first_tx_hash == rhs.first_tx_hash
33  and batch_size == rhs.batch_size;
34  }
35  };
36 
41 
45  virtual boost::optional<BatchInfo> nextBatchInfo() const = 0;
46 
51  const = 0;
52 
53  std::string toString() const override;
54 
55  bool operator==(const ModelType &rhs) const override;
56  };
57  } // namespace interface
58 } // namespace shared_model
59 
60 #endif // IROHA_SHARED_MODEL_PENDING_TRANSACTIONS_PAGE_RESPONSE_HPP
Definition: pending_transactions_page_response.hpp:22
interface::types::TransactionsNumberType batch_size
Definition: pending_transactions_page_response.hpp:29
Definition: hash.hpp:18
virtual boost::optional< BatchInfo > nextBatchInfo() const =0
bool operator==(const BatchInfo &rhs) const
Definition: pending_transactions_page_response.hpp:31
virtual types::TransactionsCollectionType transactions() const =0
std::string toString() const override
Definition: pending_transactions_page_response.cpp:13
virtual interface::types::TransactionsNumberType allTransactionsSize() const =0
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:81
interface::types::HashType first_tx_hash
Definition: pending_transactions_page_response.hpp:28
Definition: pending_transactions_page_response.hpp:27
Definition: model_primitive.hpp:22
Definition: command_executor.hpp:12
boost::any_range< Transaction, boost::random_access_traversal_tag, const Transaction & > TransactionsCollectionType
Type of transactions&#39; collection.
Definition: range_types.hpp:29