hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_index_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_POSTGRES_BLOCK_INDEX_HPP
7 #define IROHA_POSTGRES_BLOCK_INDEX_HPP
8 
10 
11 #include "ametsuchi/indexer.hpp"
13 #include "logger/logger_fwd.hpp"
14 
15 namespace iroha {
16  namespace ametsuchi {
30  class BlockIndexImpl : public BlockIndex {
31  public:
32  BlockIndexImpl(std::unique_ptr<Indexer> indexer, logger::LoggerPtr log);
33 
35  void index(const shared_model::interface::Block &block) override;
36 
37  private:
39  void makeAccountAssetIndex(
43  Indexer::TxPosition position,
45 
46  std::unique_ptr<Indexer> indexer_;
47  logger::LoggerPtr log_;
48  };
49  } // namespace ametsuchi
50 } // namespace iroha
51 
52 #endif // IROHA_POSTGRES_BLOCK_INDEX_HPP
Definition: block_index_impl.hpp:30
Definition: block_query.hpp:17
Definition: hash.hpp:18
boost::any_range< Command, boost::random_access_traversal_tag, const Command & > CommandsType
Type of ordered collection of commands.
Definition: transaction.hpp:39
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_index.hpp:22
Definition: block.hpp:16
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
Position of a transaction in the ledger.
Definition: indexer.hpp:26
BlockIndexImpl(std::unique_ptr< Indexer > indexer, logger::LoggerPtr log)
Definition: block_index_impl.cpp:70
void index(const shared_model::interface::Block &block) override
Index a block.
Definition: block_index_impl.cpp:74
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:69