mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-15 22:32:37 -03:00
26 lines
721 B
C++
26 lines
721 B
C++
|
// Copyright (c) 2021 The Bitcoin Core developers
|
||
|
// Distributed under the MIT software license, see the accompanying
|
||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||
|
|
||
|
#include <wallet/transaction.h>
|
||
|
|
||
|
bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
|
||
|
{
|
||
|
CMutableTransaction tx1 {*this->tx};
|
||
|
CMutableTransaction tx2 {*_tx.tx};
|
||
|
for (auto& txin : tx1.vin) txin.scriptSig = CScript();
|
||
|
for (auto& txin : tx2.vin) txin.scriptSig = CScript();
|
||
|
return CTransaction(tx1) == CTransaction(tx2);
|
||
|
}
|
||
|
|
||
|
bool CWalletTx::InMempool() const
|
||
|
{
|
||
|
return fInMempool;
|
||
|
}
|
||
|
|
||
|
int64_t CWalletTx::GetTxTime() const
|
||
|
{
|
||
|
int64_t n = nTimeSmart;
|
||
|
return n ? n : nTimeReceived;
|
||
|
}
|