mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
wallet refactor: use CWalletTx member functions to determine tx state
This commit is contained in:
parent
ffe5ff1fb6
commit
d64922b590
4 changed files with 6 additions and 12 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue