LCOV - code coverage report
Current view: top level - src/test/util - coins.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 0.0 % 9 0
Test Date: 2024-12-04 04:00:22 Functions: 0.0 % 1 0
Branches: 0.0 % 2 0

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2023 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 <test/util/coins.h>
       6                 :             : 
       7                 :             : #include <coins.h>
       8                 :             : #include <primitives/transaction.h>
       9                 :             : #include <script/script.h>
      10                 :             : #include <test/util/random.h>
      11                 :             : #include <uint256.h>
      12                 :             : 
      13                 :             : #include <stdint.h>
      14                 :             : #include <utility>
      15                 :             : 
      16                 :           0 : COutPoint AddTestCoin(FastRandomContext& rng, CCoinsViewCache& coins_view)
      17                 :             : {
      18                 :           0 :     Coin new_coin;
      19                 :           0 :     COutPoint outpoint{Txid::FromUint256(rng.rand256()), /*nIn=*/0};
      20                 :           0 :     new_coin.nHeight = 1;
      21                 :           0 :     new_coin.out.nValue = RandMoney(rng);
      22                 :           0 :     new_coin.out.scriptPubKey.assign(uint32_t{56}, 1);
      23         [ #  # ]:           0 :     coins_view.AddCoin(outpoint, std::move(new_coin), /*possible_overwrite=*/false);
      24                 :             : 
      25                 :           0 :     return outpoint;
      26                 :           0 : };
        

Generated by: LCOV version 2.0-1