LCOV - code coverage report
Current view: top level - src/test/fuzz - tx_in.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 2 11 18.2 %
Date: 2023-09-26 12:08:55 Functions: 2 3 66.7 %

          Line data    Source code
       1             : // Copyright (c) 2019-2020 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 <consensus/validation.h>
       6             : #include <core_memusage.h>
       7             : #include <policy/policy.h>
       8             : #include <primitives/transaction.h>
       9             : #include <streams.h>
      10             : #include <test/fuzz/fuzz.h>
      11             : #include <version.h>
      12             : 
      13             : #include <cassert>
      14             : 
      15           4 : FUZZ_TARGET(tx_in)
      16             : {
      17           0 :     DataStream ds{buffer};
      18           0 :     CTxIn tx_in;
      19             :     try {
      20           0 :         ds >> tx_in;
      21           0 :     } catch (const std::ios_base::failure&) {
      22             :         return;
      23           0 :     }
      24             : 
      25           2 :     (void)GetTransactionInputWeight(tx_in);
      26           0 :     (void)GetVirtualTransactionInputSize(tx_in);
      27           0 :     (void)RecursiveDynamicUsage(tx_in);
      28             : 
      29           0 :     (void)tx_in.ToString();
      30           0 : }

Generated by: LCOV version 1.14