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 
IsEquivalentTo(const CWalletTx & _tx) const7 bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
8 {
9         CMutableTransaction tx1 {*this->tx};
10         CMutableTransaction tx2 {*_tx.tx};
11         for (auto& txin : tx1.vin) txin.scriptSig = CScript();
12         for (auto& txin : tx2.vin) txin.scriptSig = CScript();
13         return CTransaction(tx1) == CTransaction(tx2);
14 }
15 
InMempool() const16 bool CWalletTx::InMempool() const
17 {
18     return fInMempool;
19 }
20 
GetTxTime() const21 int64_t CWalletTx::GetTxTime() const
22 {
23     int64_t n = nTimeSmart;
24     return n ? n : nTimeReceived;
25 }
26