LCOV - code coverage report
Current view: top level - src - uint256.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 6 6
Test Date: 2025-04-25 04:10:03 Functions: 100.0 % 4 4
Branches: 100.0 % 2 2

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2009-2010 Satoshi Nakamoto
       2                 :             : // Copyright (c) 2009-2020 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 <uint256.h>
       7                 :             : 
       8                 :             : #include <util/strencodings.h>
       9                 :             : 
      10                 :             : template <unsigned int BITS>
      11                 :     6940649 : std::string base_blob<BITS>::GetHex() const
      12                 :             : {
      13                 :             :     uint8_t m_data_rev[WIDTH];
      14         [ +  + ]:   229020525 :     for (int i = 0; i < WIDTH; ++i) {
      15                 :   222079876 :         m_data_rev[i] = m_data[WIDTH - 1 - i];
      16                 :             :     }
      17                 :     6940649 :     return HexStr(m_data_rev);
      18                 :             : }
      19                 :             : 
      20                 :             : template <unsigned int BITS>
      21                 :     6793210 : std::string base_blob<BITS>::ToString() const
      22                 :             : {
      23                 :     6793210 :     return (GetHex());
      24                 :             : }
      25                 :             : 
      26                 :             : // Explicit instantiations for base_blob<160>
      27                 :             : template std::string base_blob<160>::GetHex() const;
      28                 :             : template std::string base_blob<160>::ToString() const;
      29                 :             : 
      30                 :             : // Explicit instantiations for base_blob<256>
      31                 :             : template std::string base_blob<256>::GetHex() const;
      32                 :             : template std::string base_blob<256>::ToString() const;
      33                 :             : 
      34                 :             : const uint256 uint256::ZERO(0);
      35                 :             : const uint256 uint256::ONE(1);
        

Generated by: LCOV version 2.0-1