LCOV - code coverage report
Current view: top level - shared_model/interfaces/impl - transaction.cpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 13 14 92.9 %
Date: 2019-03-07 14:46:43 Functions: 3 3 100.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 "interfaces/transaction.hpp"
       7             : 
       8             : #include "interfaces/commands/command.hpp"
       9             : #include "interfaces/iroha_internal/batch_meta.hpp"
      10             : #include "utils/string_builder.hpp"
      11             : 
      12             : namespace shared_model {
      13             :   namespace interface {
      14             : 
      15             :     std::string Transaction::toString() const {
      16         150 :       return detail::PrettyStringBuilder()
      17         149 :           .init("Transaction")
      18         149 :           .append("hash", hash().hex())
      19         148 :           .append("creatorAccountId", creatorAccountId())
      20         150 :           .append("createdTime", std::to_string(createdTime()))
      21         149 :           .append("quorum", std::to_string(quorum()))
      22         148 :           .append("commands")
      23         149 :           .appendAll(commands(),
      24             :                      [](auto &command) { return command.toString(); })
      25         149 :           .append("batch_meta",
      26         149 :                   batchMeta() ? batchMeta()->get()->toString() : "")
      27         150 :           .append("reducedHash", reducedHash().toString())
      28         149 :           .append("signatures")
      29             :           .appendAll(signatures(), [](auto &sig) { return sig.toString(); })
      30         150 :           .finalize();
      31           0 :     }
      32             : 
      33             :   }  // namespace interface
      34             : }  // namespace shared_model

Generated by: LCOV version 1.13