LCOV - code coverage report
Current view: top level - src/test/fuzz - signet.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 0.0 % 11 0
Test Date: 2024-08-28 04:44:32 Functions: 0.0 % 3 0
Branches: 0.0 % 16 0

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2020-2021 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 <chainparams.h>
       6                 :             : #include <consensus/validation.h>
       7                 :             : #include <primitives/block.h>
       8                 :             : #include <signet.h>
       9                 :             : #include <streams.h>
      10                 :             : #include <test/fuzz/FuzzedDataProvider.h>
      11                 :             : #include <test/fuzz/fuzz.h>
      12                 :             : #include <test/fuzz/util.h>
      13                 :             : #include <test/util/setup_common.h>
      14                 :             : #include <util/chaintype.h>
      15                 :             : 
      16                 :             : #include <cstdint>
      17                 :             : #include <optional>
      18                 :             : #include <vector>
      19                 :             : 
      20                 :           0 : void initialize_signet()
      21                 :             : {
      22   [ #  #  #  # ]:           0 :     static const auto testing_setup = MakeNoLogFileContext<>(ChainType::SIGNET);
      23         [ #  # ]:           0 : }
      24                 :             : 
      25         [ #  # ]:           0 : FUZZ_TARGET(signet, .init = initialize_signet)
      26                 :             : {
      27                 :           0 :     FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
      28                 :           0 :     const std::optional<CBlock> block = ConsumeDeserializable<CBlock>(fuzzed_data_provider, TX_WITH_WITNESS);
      29         [ #  # ]:           0 :     if (!block) {
      30                 :           0 :         return;
      31                 :             :     }
      32   [ #  #  #  # ]:           0 :     (void)CheckSignetBlockSolution(*block, Params().GetConsensus());
      33         [ #  # ]:           0 :     (void)SignetTxs::Create(*block, ConsumeScript(fuzzed_data_provider));
      34                 :           0 : }
        

Generated by: LCOV version 2.0-1