forked from CoinBlack/blackcoin-more
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtransaction.cpp
32 lines (27 loc) · 846 Bytes
/
transaction.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 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>
namespace wallet {
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 state<TxStateInMempool>();
}
int64_t CWalletTx::GetTxTime() const
{
int64_t n = nTimeSmart;
return n ? n : nTimeReceived;
}
void CWalletTx::CopyFrom(const CWalletTx& _tx)
{
*this = _tx;
}
} // namespace wallet