Skip to content

Commit cecaced

Browse files
committed
Fix typo in variable name.
Fix a mistyped variable name. Also use the previous transaction hash directly when emitting a notification, instead of relying on the prevout value of the spending transaction. This is more explicit and decouples the meaning (e.g. for segwit light in the future).
1 parent 40e6da5 commit cecaced

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

divi/src/wallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,10 +2263,10 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
22632263

22642264
// Notify that old coins are spent
22652265
{
2266-
set<uint256> updated_hahes;
2266+
std::set<uint256> updated_hashes;
22672267
BOOST_FOREACH (const CTxIn& txin, wtxNew.vin) {
22682268
// notify only once
2269-
if (updated_hahes.find(txin.prevout.hash) != updated_hahes.end()) continue;
2269+
if (updated_hashes.find(txin.prevout.hash) != updated_hashes.end()) continue;
22702270

22712271
CWalletTx* coinPtr = const_cast<CWalletTx*>(GetWalletTx(txin.prevout.hash));
22722272
if(!coinPtr)
@@ -2275,8 +2275,8 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
22752275
assert(coinPtr);
22762276
}
22772277
coinPtr->RecomputeCachedQuantities();
2278-
NotifyTransactionChanged(this, txin.prevout.hash, CT_UPDATED);
2279-
updated_hahes.insert(txin.prevout.hash);
2278+
NotifyTransactionChanged(this, coinPtr->GetHash(), CT_UPDATED);
2279+
updated_hashes.insert(txin.prevout.hash);
22802280
}
22812281
}
22822282

0 commit comments

Comments
 (0)