mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Use Txid in COutpoint
This commit is contained in:
@@ -681,7 +681,7 @@ std::set<uint256> CWallet::GetConflicts(const uint256& txid) const
|
||||
bool CWallet::HasWalletSpend(const CTransactionRef& tx) const
|
||||
{
|
||||
AssertLockHeld(cs_wallet);
|
||||
const uint256& txid = tx->GetHash();
|
||||
const Txid& txid = tx->GetHash();
|
||||
for (unsigned int i = 0; i < tx->vout.size(); ++i) {
|
||||
if (IsSpent(COutPoint(txid, i))) {
|
||||
return true;
|
||||
@@ -1373,7 +1373,7 @@ void CWallet::RecursiveUpdateTxState(const uint256& tx_hash, const TryUpdatingSt
|
||||
batch.WriteTx(wtx);
|
||||
// Iterate over all its outputs, and update those tx states as well (if applicable)
|
||||
for (unsigned int i = 0; i < wtx.tx->vout.size(); ++i) {
|
||||
std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range = mapTxSpends.equal_range(COutPoint(now, i));
|
||||
std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range = mapTxSpends.equal_range(COutPoint(Txid::FromUint256(now), i));
|
||||
for (TxSpends::const_iterator iter = range.first; iter != range.second; ++iter) {
|
||||
if (!done.count(iter->second)) {
|
||||
todo.insert(iter->second);
|
||||
|
||||
Reference in New Issue
Block a user