hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
indexer.hpp
Go to the documentation of this file.
1 
6 #ifndef AMETSUCHI_INDEXER_HPP
7 #define AMETSUCHI_INDEXER_HPP
8 
9 #include <string>
10 
11 #include "common/result.hpp"
13 
14 namespace iroha {
15  namespace ametsuchi {
16 
21  class Indexer {
22  public:
23  virtual ~Indexer() = default;
24 
26  struct TxPosition {
29  size_t index;
30  };
31 
33  virtual void committedTxHash(
35  &committed_tx_hash) = 0;
36 
38  virtual void rejectedTxHash(
39  const shared_model::interface::types::HashType &rejected_tx_hash) = 0;
40 
42  virtual void txPositions(
45  boost::optional<shared_model::interface::types::AssetIdType>
46  &&asset_id,
48  TxPosition const &position) = 0;
49 
57  };
58 
59  } // namespace ametsuchi
60 } // namespace iroha
61 
62 #endif /* AMETSUCHI_INDEXER_HPP */
uint64_t HeightType
Type of height (for Block, Proposal etc)
Definition: types.hpp:48
Definition: hash.hpp:18
Definition: result_fwd.hpp:27
size_t index
the number of this transaction in the block
Definition: indexer.hpp:29
virtual void committedTxHash(const shared_model::interface::types::HashType &committed_tx_hash)=0
Store a committed tx hash.
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 iroha::expected::Result< void, std::string > flush()=0
virtual void txPositions(shared_model::interface::types::AccountIdType const &creator, shared_model::interface::types::HashType const &hash, boost::optional< shared_model::interface::types::AssetIdType > &&asset_id, shared_model::interface::types::TimestampType const ts, TxPosition const &position)=0
Index tx info.
virtual void rejectedTxHash(const shared_model::interface::types::HashType &rejected_tx_hash)=0
Store a rejected tx hash.
Position of a transaction in the ledger.
Definition: indexer.hpp:26
shared_model::interface::types::HeightType height
the height of block containing this transaction
Definition: indexer.hpp:28
virtual ~Indexer()=default
Definition: indexer.hpp:21
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:67