diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-04-27 10:52:30 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-06-08 11:22:39 -0300 |
commit | a06fa94ff81e2bccef0316ea5ec4eca0f4de5071 (patch) | |
tree | 2539c545d00292374270690795d78a91b92fee6c /src/wallet/wallet.cpp | |
parent | 91902b77202fc636edb3db587cb6e87d9fb9b60a (diff) |
wallet: IsSpent, 'COutPoint' arg instead of (hash, index)
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 19650ed166..de5f191520 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -629,14 +629,12 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran * Outpoint is spent if any non-conflicted transaction * spends it: */ -bool CWallet::IsSpent(const uint256& hash, unsigned int n) const +bool CWallet::IsSpent(const COutPoint& outpoint) const { - const COutPoint outpoint(hash, n); std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range; range = mapTxSpends.equal_range(outpoint); - for (TxSpends::const_iterator it = range.first; it != range.second; ++it) - { + for (TxSpends::const_iterator it = range.first; it != range.second; ++it) { const uint256& wtxid = it->second; std::map<uint256, CWalletTx>::const_iterator mit = mapWallet.find(wtxid); if (mit != mapWallet.end()) { |