hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
tx_presence_cache.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TX_PRESENCE_CACHE_HPP
7 #define IROHA_TX_PRESENCE_CACHE_HPP
8 
9 #include <vector>
10 
11 #include <boost/optional.hpp>
13 
14 namespace shared_model {
15  namespace crypto {
16  class Hash;
17  } // namespace crypto
18 
19  namespace interface {
20  class TransactionBatch;
21  } // namespace interface
22 } // namespace shared_model
23 
24 namespace iroha {
25  namespace ametsuchi {
26 
31  public:
37  virtual boost::optional<TxCacheStatusType> check(
38  const shared_model::crypto::Hash &hash) const = 0;
39 
41  using BatchStatusCollectionType = std::vector<TxCacheStatusType>;
42 
48  virtual boost::optional<BatchStatusCollectionType> check(
49  const shared_model::interface::TransactionBatch &batch) const = 0;
50 
51  // TODO: 09/11/2018 @muratovv add method for processing collection of
52  // batches IR-1857
53 
54  virtual ~TxPresenceCache() = default;
55  };
56  } // namespace ametsuchi
57 } // namespace iroha
58 #endif // IROHA_TX_PRESENCE_CACHE_HPP
Definition: hash.hpp:18
std::vector< TxCacheStatusType > BatchStatusCollectionType
response type which reflects status of each transaction in a batch
Definition: tx_presence_cache.hpp:41
Definition: block_query.hpp:16
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
Definition: transaction_batch.hpp:22
Definition: tx_presence_cache.hpp:30
Definition: command_executor.hpp:12