LCOV - code coverage report
Current view: top level - irohad/main/impl - block_loader_init.cpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 0 12 0.0 %
Date: 2018-12-05 17:11:35 Functions: 0 7 0.0 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #include "main/impl/block_loader_init.hpp"
       7             : #include "validators/default_validator.hpp"
       8             : 
       9             : using namespace iroha;
      10             : using namespace iroha::ametsuchi;
      11             : using namespace iroha::network;
      12             : 
      13             : auto BlockLoaderInit::createService(
      14             :     std::shared_ptr<BlockQueryFactory> block_query_factory,
      15             :     std::shared_ptr<consensus::ConsensusResultCache> consensus_result_cache) {
      16           0 :   return std::make_shared<BlockLoaderService>(
      17           0 :       std::move(block_query_factory), std::move(consensus_result_cache));
      18             : }
      19             : 
      20             : auto BlockLoaderInit::createLoader(
      21             :     std::shared_ptr<PeerQueryFactory> peer_query_factory) {
      22           0 :   shared_model::proto::ProtoBlockFactory factory(
      23           0 :       std::make_unique<
      24             :           shared_model::validation::DefaultSignedBlockValidator>());
      25           0 :   return std::make_shared<BlockLoaderImpl>(std::move(peer_query_factory),
      26           0 :                                            std::move(factory));
      27           0 : }
      28             : 
      29             : std::shared_ptr<BlockLoader> BlockLoaderInit::initBlockLoader(
      30             :     std::shared_ptr<PeerQueryFactory> peer_query_factory,
      31             :     std::shared_ptr<BlockQueryFactory> block_query_factory,
      32             :     std::shared_ptr<consensus::ConsensusResultCache> consensus_result_cache) {
      33           0 :   service = createService(std::move(block_query_factory),
      34           0 :                           std::move(consensus_result_cache));
      35           0 :   loader = createLoader(std::move(peer_query_factory));
      36           0 :   return loader;
      37           0 : }

Generated by: LCOV version 1.13