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
9
#include "
interfaces/base/model_primitive.hpp
"
10
11
#include <optional>
12
#include "
cryptography/hash.hpp
"
13
#include "
interfaces/common_objects/range_types.hpp
"
14
#include "
interfaces/common_objects/types.hpp
"
15
16
namespace
shared_model
{
17
namespace
interface {
18
22
class
PendingTransactionsPageResponse
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
{
28
interface::types::HashType
first_tx_hash
;
29
interface::types::TransactionsNumberType
batch_size
;
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
std::string
toString
()
const
;
37
};
38
42
virtual
types::TransactionsCollectionType
transactions
()
const
= 0;
43
47
virtual
std::optional<BatchInfo>
nextBatchInfo
()
const
= 0;
48
52
virtual
interface::types::TransactionsNumberType
allTransactionsSize
()
53
const
= 0;
54
55
std::string
toString
()
const override
;
56
57
bool
operator==
(
const
ModelType
&rhs)
const override
;
58
};
59
}
// namespace interface
60
}
// namespace shared_model
61
62
#endif // IROHA_SHARED_MODEL_PENDING_TRANSACTIONS_PAGE_RESPONSE_HPP
shared_model::interface::PendingTransactionsPageResponse
Definition:
pending_transactions_page_response.hpp:22
shared_model::interface::PendingTransactionsPageResponse::BatchInfo::batch_size
interface::types::TransactionsNumberType batch_size
Definition:
pending_transactions_page_response.hpp:29
shared_model::crypto::Hash
Definition:
hash.hpp:18
shared_model::interface::PendingTransactionsPageResponse::BatchInfo::toString
std::string toString() const
Definition:
pending_transactions_page_response.cpp:12
shared_model::interface::PendingTransactionsPageResponse::BatchInfo::operator==
bool operator==(const BatchInfo &rhs) const
Definition:
pending_transactions_page_response.hpp:31
shared_model::interface::PendingTransactionsPageResponse::transactions
virtual types::TransactionsCollectionType transactions() const =0
types.hpp
shared_model::interface::PendingTransactionsPageResponse::allTransactionsSize
virtual interface::types::TransactionsNumberType allTransactionsSize() const =0
shared_model::interface::PendingTransactionsPageResponse::nextBatchInfo
virtual std::optional< BatchInfo > nextBatchInfo() const =0
range_types.hpp
shared_model::interface::types::TransactionsNumberType
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition:
types.hpp:86
shared_model::interface::PendingTransactionsPageResponse::BatchInfo::first_tx_hash
interface::types::HashType first_tx_hash
Definition:
pending_transactions_page_response.hpp:28
shared_model::interface::PendingTransactionsPageResponse::BatchInfo
Definition:
pending_transactions_page_response.hpp:27
model_primitive.hpp
hash.hpp
shared_model::interface::ModelPrimitive
Definition:
model_primitive.hpp:22
shared_model
Definition:
command_executor.hpp:13
shared_model::interface::types::TransactionsCollectionType
boost::any_range< Transaction, boost::random_access_traversal_tag, Transaction & > TransactionsCollectionType
Type of transactions' collection.
Definition:
range_types.hpp:29
shared_model
interfaces
query_responses
pending_transactions_page_response.hpp
Generated by
1.8.13