LCOV - code coverage report
Current view: top level - src/kernel - context.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 100.0 % 8 8
Test Date: 2024-08-28 04:44:32 Functions: 100.0 % 2 2
Branches: 50.0 % 4 2

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2022 The Bitcoin Core developers
       2                 :             : // Distributed under the MIT software license, see the accompanying
       3                 :             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4                 :             : 
       5                 :             : #include <kernel/context.h>
       6                 :             : 
       7                 :             : #include <crypto/sha256.h>
       8                 :             : #include <logging.h>
       9                 :             : #include <random.h>
      10                 :             : 
      11                 :             : #include <mutex>
      12                 :             : #include <string>
      13                 :             : 
      14                 :             : namespace kernel {
      15                 :         583 : Context::Context()
      16                 :             : {
      17                 :         583 :     static std::once_flag globals_initialized{};
      18                 :         583 :     std::call_once(globals_initialized, []() {
      19                 :         100 :         std::string sha256_algo = SHA256AutoDetect();
      20         [ +  - ]:         100 :         LogInfo("Using the '%s' SHA256 implementation\n", sha256_algo);
      21         [ +  - ]:         100 :         RandomInit();
      22                 :         100 :     });
      23                 :         583 : }
      24                 :             : 
      25                 :             : 
      26                 :             : } // namespace kernel
        

Generated by: LCOV version 2.0-1