LCOV - code coverage report
Current view: top level - irohad/model/generators/impl - block_generator.cpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 0 11 0.0 %
Date: 2019-03-07 14:46:43 Functions: 0 1 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 "model/generators/block_generator.hpp"
       7             : 
       8             : #include "model/sha3_hash.hpp"
       9             : 
      10             : namespace iroha {
      11             :   namespace model {
      12             :     namespace generators {
      13             :       Block BlockGenerator::generateGenesisBlock(
      14             :           ts64_t created_ts, const std::vector<Transaction> &transactions) {
      15           0 :         Block block{};
      16           0 :         block.created_ts = created_ts;
      17           0 :         block.height = 1;
      18           0 :         std::fill(block.prev_hash.begin(), block.prev_hash.end(), 0);
      19           0 :         block.txs_number = 1;
      20           0 :         block.transactions = transactions;
      21           0 :         block.hash = hash(block);
      22             : 
      23           0 :         return block;
      24           0 :       }
      25             : 
      26             :     }  // namespace generators
      27             :   }    // namespace model
      28             : }  // namespace iroha

Generated by: LCOV version 1.13