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  class MstState;
19 
24  public:
29  enum ErrorCode {
30  kNotFound, // there is no batch which first tx has specified hash
31  };
32 
37  struct Response {
41  std::optional<
44 
46  };
47 
48  // TODO igor-egorov 2019-06-06 IR-516 remove deprecated interface
57  [[deprecated]] virtual shared_model::interface::types::
58  SharedTxsCollectionType
61  const = 0;
62 
67  virtual void insertPresenceCache(
68  std::shared_ptr<ametsuchi::TxPresenceCache> &cache) = 0;
69 
82  const std::optional<shared_model::interface::types::HashType>
83  &first_tx_hash) const = 0;
84 
85  virtual void removeTransaction(
87 
88  virtual void updatedBatchesHandler(
89  std::shared_ptr<MstState> const &updated_batches) = 0;
90 
91  virtual void removeBatch(
92  std::shared_ptr<shared_model::interface::TransactionBatch> const
93  &batch) = 0;
94 
95  virtual ~PendingTransactionStorage() = default;
96  };
97 
98 } // namespace iroha
99 
100 #endif // IROHA_PENDING_TXS_STORAGE_HPP
shared_model::interface::types::TransactionsNumberType all_transactions_size
Definition: pending_txs_storage.hpp:40
Definition: hash.hpp:18
Response()
Definition: pending_txs_storage.hpp:45
Definition: pending_txs_storage.hpp:30
Definition: result_fwd.hpp:27
Definition: block_query.hpp:15
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
virtual void removeBatch(std::shared_ptr< shared_model::interface::TransactionBatch > const &batch)=0
ErrorCode
Definition: pending_txs_storage.hpp:29
virtual void insertPresenceCache(std::shared_ptr< ametsuchi::TxPresenceCache > &cache)=0
Definition: pending_txs_storage.hpp:37
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:43
uint16_t TransactionsNumberType
Type of a number of transactions in block and query response page.
Definition: types.hpp:86
Definition: pending_transactions_page_response.hpp:27
virtual void removeTransaction(shared_model::interface::types::HashType const &hash)=0
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:23
shared_model::interface::types::SharedTxsCollectionType transactions
Definition: pending_txs_storage.hpp:38
virtual void updatedBatchesHandler(std::shared_ptr< MstState > const &updated_batches)=0