hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
postgres_block_index.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 PostgresBlockIndex : public BlockIndex {
31  public:
32  PostgresBlockIndex(std::unique_ptr<Indexer> indexer,
33  logger::LoggerPtr log);
34 
36  void index(const shared_model::interface::Block &block) override;
37 
38  private:
40  void makeAccountAssetIndex(
42  Indexer::TxPosition position,
44 
45  std::unique_ptr<Indexer> indexer_;
46  logger::LoggerPtr log_;
47  };
48  } // namespace ametsuchi
49 } // namespace iroha
50 
51 #endif // IROHA_POSTGRES_BLOCK_INDEX_HPP
PostgresBlockIndex(std::unique_ptr< Indexer > indexer, logger::LoggerPtr log)
Definition: postgres_block_index.cpp:63
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:14
std::string AccountIdType
Type of account id.
Definition: types.hpp:39
Definition: postgres_block_index.hpp:30
Position of a transaction in the ledger.
Definition: indexer.hpp:26
void index(const shared_model::interface::Block &block) override
Index a block.
Definition: postgres_block_index.cpp:67