aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-01-08 17:36:15 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-01-08 17:36:19 +0100
commit9de541a9c95a47c3f5c9e443a0ad3040b9791a2f (patch)
tree95e2328daea9b67b38cb7db0216602a506322cec
parent3b57e9cff09c528201246dbc7b890c1593e49fb1 (diff)
parentf61766b37beb2fecbe3915a72a814cbdb107be0a (diff)
downloadbitcoin-9de541a9c95a47c3f5c9e443a0ad3040b9791a2f.tar.xz
Merge pull request #7306
f61766b Make sure conflicted wallet tx's update balances (Alex Morcos)
-rw-r--r--src/wallet/wallet.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 444bd88f8b..1904361bae 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -811,6 +811,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
}
iter++;
}
+ // If a transaction changes 'conflicted' state, that changes the balance
+ // available of the outputs it spends. So force those to be recomputed
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ {
+ if (mapWallet.count(txin.prevout.hash))
+ mapWallet[txin.prevout.hash].MarkDirty();
+ }
}
}
}