diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-08 17:36:15 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-08 17:36:19 +0100 |
commit | 9de541a9c95a47c3f5c9e443a0ad3040b9791a2f (patch) | |
tree | 95e2328daea9b67b38cb7db0216602a506322cec /src/wallet/wallet.cpp | |
parent | 3b57e9cff09c528201246dbc7b890c1593e49fb1 (diff) | |
parent | f61766b37beb2fecbe3915a72a814cbdb107be0a (diff) |
Merge pull request #7306
f61766b Make sure conflicted wallet tx's update balances (Alex Morcos)
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(); + } } } } |