LCOV - code coverage report
Current view: top level - shared_model/interfaces/impl - transaction.cpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 13 14 92.9 %
Date: 2018-12-05 17:11:35 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         902 :       return detail::PrettyStringBuilder()
      17         902 :           .init("Transaction")
      18         902 :           .append("hash", hash().hex())
      19         902 :           .append("creatorAccountId", creatorAccountId())
      20         902 :           .append("createdTime", std::to_string(createdTime()))
      21         902 :           .append("quorum", std::to_string(quorum()))
      22         902 :           .append("commands")
      23         902 :           .appendAll(commands(),
      24             :                      [](auto &command) { return command.toString(); })
      25         902 :           .append("batch_meta",
      26         902 :                   batchMeta() ? batchMeta()->get()->toString() : "")
      27         902 :           .append("reducedHash", reducedHash().toString())
      28         902 :           .append("signatures")
      29             :           .appendAll(signatures(), [](auto &sig) { return sig.toString(); })
      30         902 :           .finalize();
      31           0 :     }
      32             : 
      33             :   }  // namespace interface
      34             : }  // namespace shared_model

Generated by: LCOV version 1.13