hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
pending_txs_storage.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PENDING_TXS_STORAGE_HPP
7 #define IROHA_PENDING_TXS_STORAGE_HPP
8 
9 #include <optional>
10 
12 #include "common/result.hpp"
16 
17 namespace iroha {
18 
23  public:
28  enum ErrorCode {
29  kNotFound, // there is no batch which first tx has specified hash
30  };
31 
36  struct Response {
40  std::optional<
43 
45  };
46 
47  // TODO igor-egorov 2019-06-06 IR-516 remove deprecated interface
56  [[deprecated]] virtual shared_model::interface::types::
57  SharedTxsCollectionType
60  const = 0;
61 
66  virtual void insertPresenceCache(
67  std::shared_ptr<ametsuchi::TxPresenceCache> &cache) = 0;
68 
81  const std::optional<shared_model::interface::types::HashType>
82  &first_tx_hash) const = 0;
83 
84  virtual ~PendingTransactionStorage() = default;
85  };
86 
87 } // namespace iroha
88 
89 #endif // IROHA_PENDING_TXS_STORAGE_HPP
shared_model::interface::types::TransactionsNumberType all_transactions_size
Definition: pending_txs_storage.hpp:39
Response()
Definition: pending_txs_storage.hpp:44
Definition: pending_txs_storage.hpp:29
Definition: result_fwd.hpp:27
Definition: block_query.hpp:15
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
ErrorCode
Definition: pending_txs_storage.hpp:28
virtual void insertPresenceCache(std::shared_ptr< ametsuchi::TxPresenceCache > &cache)=0
Definition: pending_txs_storage.hpp:36
std::vector< std::shared_ptr< Transaction > > SharedTxsCollectionType
Definition: transaction_sequence_common.hpp:27
std::optional< shared_model::interface::PendingTransactionsPageResponse::BatchInfo > next_batch_info
Definition: pending_txs_storage.hpp:42
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:84
Definition: pending_transactions_page_response.hpp:27
virtual ~PendingTransactionStorage()=default
virtual shared_model::interface::types::SharedTxsCollectionType getPendingTransactions(const shared_model::interface::types::AccountIdType &account_id) const =0
Definition: pending_txs_storage.hpp:22
shared_model::interface::types::SharedTxsCollectionType transactions
Definition: pending_txs_storage.hpp:37