mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
wallet: IsSpent, 'COutPoint' arg instead of (hash, index)
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user