LCOV - code coverage report
Current view: top level - src/test/fuzz - tx_out.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 16 16
Test Date: 2026-02-19 05:12:30 Functions: 100.0 % 2 2
Branches: 61.1 % 18 11

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2019-present 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/feerate.h>
       8                 :             : #include <policy/policy.h>
       9                 :             : #include <primitives/transaction.h>
      10                 :             : #include <streams.h>
      11                 :             : #include <test/fuzz/fuzz.h>
      12                 :             : 
      13         [ +  - ]:         532 : FUZZ_TARGET(tx_out)
      14                 :             : {
      15                 :          78 :     CTxOut tx_out;
      16                 :          78 :     try {
      17         [ +  + ]:          78 :         SpanReader{buffer} >> tx_out;
      18         [ -  + ]:          27 :     } catch (const std::ios_base::failure&) {
      19                 :          27 :         return;
      20                 :          27 :     }
      21                 :             : 
      22         [ +  - ]:          51 :     const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE};
      23         [ +  - ]:          51 :     (void)GetDustThreshold(tx_out, dust_relay_fee);
      24         [ +  - ]:          51 :     (void)IsDust(tx_out, dust_relay_fee);
      25         [ +  + ]:          51 :     (void)RecursiveDynamicUsage(tx_out);
      26                 :             : 
      27         [ +  - ]:          51 :     (void)tx_out.ToString();
      28                 :          51 :     (void)tx_out.IsNull();
      29                 :          51 :     tx_out.SetNull();
      30         [ -  + ]:          51 :     assert(tx_out.IsNull());
      31                 :          78 : }
        

Generated by: LCOV version 2.0-1