LCOV - code coverage report
Current view: top level - src/wallet - transaction.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 3 15 20.0 %
Date: 2023-11-10 23:46:46 Functions: 1 4 25.0 %
Branches: 1 18 5.6 %

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 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 <wallet/transaction.h>
       6                 :            : 
       7                 :            : namespace wallet {
       8                 :          0 : bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
       9                 :            : {
      10                 :          0 :         CMutableTransaction tx1 {*this->tx};
      11         [ #  # ]:          0 :         CMutableTransaction tx2 {*_tx.tx};
      12 [ #  # ][ #  # ]:          0 :         for (auto& txin : tx1.vin) txin.scriptSig = CScript();
      13 [ #  # ][ #  # ]:          0 :         for (auto& txin : tx2.vin) txin.scriptSig = CScript();
      14 [ #  # ][ #  # ]:          0 :         return CTransaction(tx1) == CTransaction(tx2);
                 [ #  # ]
      15                 :          0 : }
      16                 :            : 
      17                 :          0 : bool CWalletTx::InMempool() const
      18                 :            : {
      19                 :          0 :     return state<TxStateInMempool>();
      20                 :            : }
      21                 :            : 
      22                 :     213093 : int64_t CWalletTx::GetTxTime() const
      23                 :            : {
      24                 :     213093 :     int64_t n = nTimeSmart;
      25         [ +  - ]:     213093 :     return n ? n : nTimeReceived;
      26                 :            : }
      27                 :            : 
      28                 :          0 : void CWalletTx::CopyFrom(const CWalletTx& _tx)
      29                 :            : {
      30                 :          0 :     *this = _tx;
      31                 :          0 : }
      32                 :            : } // namespace wallet

Generated by: LCOV version 1.14