hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_loader_init.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_BLOCK_LOADER_INIT_HPP
7 #define IROHA_BLOCK_LOADER_INIT_HPP
8 
11 #include "logger/logger_fwd.hpp"
16 
17 namespace iroha {
18  namespace network {
23  private:
31  auto createService(
32  std::shared_ptr<ametsuchi::BlockQueryFactory> block_query_factory,
33  std::shared_ptr<consensus::ConsensusResultCache> block_cache,
34  const logger::LoggerManagerTreePtr &loader_log_manager);
35 
44  auto createLoader(
45  std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory,
46  std::shared_ptr<shared_model::validation::ValidatorsConfig>
47  validators_config,
48  logger::LoggerPtr loader_log);
49 
50  public:
60  std::shared_ptr<BlockLoader> initBlockLoader(
61  // TODO 30.01.2019 lebdron: IR-264 Remove PeerQueryFactory
62  std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory,
63  std::shared_ptr<ametsuchi::BlockQueryFactory> block_query_factory,
64  std::shared_ptr<consensus::ConsensusResultCache> block_cache,
65  std::shared_ptr<shared_model::validation::ValidatorsConfig>
66  validators_config,
67  const logger::LoggerManagerTreePtr &loader_log_manager);
68 
69  std::shared_ptr<BlockLoaderImpl> loader;
70  std::shared_ptr<BlockLoaderService> service;
71  };
72  } // namespace network
73 } // namespace iroha
74 #endif // IROHA_BLOCK_LOADER_INIT_HPP
std::shared_ptr< BlockLoader > initBlockLoader(std::shared_ptr< ametsuchi::PeerQueryFactory > peer_query_factory, std::shared_ptr< ametsuchi::BlockQueryFactory > block_query_factory, std::shared_ptr< consensus::ConsensusResultCache > block_cache, std::shared_ptr< shared_model::validation::ValidatorsConfig > validators_config, const logger::LoggerManagerTreePtr &loader_log_manager)
Definition: block_loader_init.cpp:39
Definition: block_loader_init.hpp:22
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
std::shared_ptr< BlockLoaderService > service
Definition: block_loader_init.hpp:70
Definition: block_query.hpp:14
std::shared_ptr< BlockLoaderImpl > loader
Definition: block_loader_init.hpp:69
std::shared_ptr< LoggerManagerTree > LoggerManagerTreePtr
Definition: logger_manager_fwd.hpp:14