mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
wallet refactor: use CWalletTx member functions to determine tx state
This commit is contained in:
@@ -752,8 +752,8 @@ bool CWallet::IsSpent(const COutPoint& outpoint) const
|
||||
const uint256& wtxid = it->second;
|
||||
const auto mit = mapWallet.find(wtxid);
|
||||
if (mit != mapWallet.end()) {
|
||||
int depth = GetTxDepthInMainChain(mit->second);
|
||||
if (depth > 0 || (depth == 0 && !mit->second.isAbandoned()))
|
||||
const auto& wtx = mit->second;
|
||||
if (!wtx.isAbandoned() && !wtx.isBlockConflicted())
|
||||
return true; // Spent
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user