LCOV - code coverage report
Current view: top level - src/primitives - block.cpp (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 3 17 17.6 %
Date: 2022-04-21 14:51:19 Functions: 1 2 50.0 %
Legend: Modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed

Not modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed
Branches: 0 2 0.0 %

           Branch data     Line data    Source code
#       1                 :            : // Copyright (c) 2009-2010 Satoshi Nakamoto
#       2                 :            : // Copyright (c) 2009-2019 The Bitcoin Core developers
#       3                 :            : // Distributed under the MIT software license, see the accompanying
#       4                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#       5                 :            : 
#       6                 :            : #include <primitives/block.h>
#       7                 :            : 
#       8                 :            : #include <hash.h>
#       9                 :            : #include <tinyformat.h>
#      10                 :            : 
#      11                 :            : uint256 CBlockHeader::GetHash() const
#      12                 :   13141708 : {
#      13                 :   13141708 :     return SerializeHash(*this);
#      14                 :   13141708 : }
#      15                 :            : 
#      16                 :            : std::string CBlock::ToString() const
#      17                 :          0 : {
#      18                 :          0 :     std::stringstream s;
#      19                 :          0 :     s << strprintf("CBlock(hash=%s, ver=0x%08x, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
#      20                 :          0 :         GetHash().ToString(),
#      21                 :          0 :         nVersion,
#      22                 :          0 :         hashPrevBlock.ToString(),
#      23                 :          0 :         hashMerkleRoot.ToString(),
#      24                 :          0 :         nTime, nBits, nNonce,
#      25                 :          0 :         vtx.size());
#      26         [ #  # ]:          0 :     for (const auto& tx : vtx) {
#      27                 :          0 :         s << "  " << tx->ToString() << "\n";
#      28                 :          0 :     }
#      29                 :          0 :     return s.str();
#      30                 :          0 : }

Generated by: LCOV version 0-eol-96201-ge66f56f4af6a