aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Woosley <[email protected]>2018-07-12 17:19:00 -0400
committerBen Woosley <[email protected]>2018-07-13 11:16:08 -0400
commit89e70f9d7fe384ef9de4fa3828d4c80523290186 (patch)
tree6b414840dd03987cddd9237864a98ecdf76ddfa1 /src
parentMerge #13177: GCC-7 and glibc-2.27 back compat code (diff)
downloaddiscoin-89e70f9d7fe384ef9de4fa3828d4c80523290186.tar.xz
discoin-89e70f9d7fe384ef9de4fa3828d4c80523290186.zip
Fix that CWallet::AbandonTransaction would only traverse one level
Prior to this change, it would mark only the first layer of child transactions abandoned, due to always following the input hashTx rather than the current now tx.
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index cdba6c644..b8cbaeeec 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1146,7 +1146,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx)
batch.WriteTx(wtx);
NotifyTransactionChanged(this, wtx.GetHash(), CT_UPDATED);
// Iterate over all its outputs, and mark transactions in the wallet that spend them abandoned too
- TxSpends::const_iterator iter = mapTxSpends.lower_bound(COutPoint(hashTx, 0));
+ TxSpends::const_iterator iter = mapTxSpends.lower_bound(COutPoint(now, 0));
while (iter != mapTxSpends.end() && iter->first.hash == now) {
if (!done.count(iter->second)) {
todo.insert(iter->second);