LCOV - code coverage report
Current view: top level - src/kernel - checks.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 1 10 10.0 %
Date: 2023-09-26 12:08:55 Functions: 1 2 50.0 %

          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/checks.h>
       6             : 
       7             : #include <key.h>
       8             : #include <random.h>
       9             : #include <util/time.h>
      10             : #include <util/translation.h>
      11             : 
      12             : #include <memory>
      13             : 
      14             : namespace kernel {
      15             : 
      16           0 : util::Result<void> SanityChecks(const Context&)
      17             : {
      18           0 :     if (!ECC_InitSanityCheck()) {
      19           0 :         return util::Error{Untranslated("Elliptic curve cryptography sanity check failure. Aborting.")};
      20             :     }
      21             : 
      22           0 :     if (!Random_SanityCheck()) {
      23           0 :         return util::Error{Untranslated("OS cryptographic RNG sanity check failure. Aborting.")};
      24             :     }
      25             : 
      26           0 :     if (!ChronoSanityCheck()) {
      27           0 :         return util::Error{Untranslated("Clock epoch mismatch. Aborting.")};
      28             :     }
      29             : 
      30           0 :     return {};
      31           0 : }
      32             : 
      33             : }

Generated by: LCOV version 1.14