diff options
author | ishaanam <ishaana.misra@gmail.com> | 2023-03-01 13:46:23 -0500 |
---|---|---|
committer | ishaanam <ishaana.misra@gmail.com> | 2024-03-15 18:03:42 -0400 |
commit | d64922b5903e5ffc8d2ce0e6761f99f173b60800 (patch) | |
tree | e1bb5c6bbbef6e04657dfe3d8833811ae50b7356 /src/wallet/wallet.cpp | |
parent | ffe5ff1fb622a8da11b66289e1b778e45e449811 (diff) | |
download | bitcoin-d64922b5903e5ffc8d2ce0e6761f99f173b60800.tar.xz |
wallet refactor: use CWalletTx member functions to determine tx state
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f2116a297d..1053b69f32 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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 } } |