diff options
author | Alex Morcos <morcos@chaincode.com> | 2016-01-06 17:24:30 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2016-01-06 17:24:30 -0500 |
commit | f61766b37beb2fecbe3915a72a814cbdb107be0a (patch) | |
tree | 33a24a05af0914dfc37bcfbf8964686f93a35c77 /src/wallet/wallet.cpp | |
parent | 605c17844ea32b6d237db6d83871164dc7d59dab (diff) | |
download | bitcoin-f61766b37beb2fecbe3915a72a814cbdb107be0a.tar.xz |
Make sure conflicted wallet tx's update balances
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 7 |
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(); + } } } } |