diff options
| author | Alex Morcos <[email protected]> | 2016-01-06 17:24:30 -0500 |
|---|---|---|
| committer | Alex Morcos <[email protected]> | 2016-01-06 17:24:30 -0500 |
| commit | f61766b37beb2fecbe3915a72a814cbdb107be0a (patch) | |
| tree | 33a24a05af0914dfc37bcfbf8964686f93a35c77 /src/wallet/wallet.cpp | |
| parent | Merge pull request #7205 (diff) | |
| download | discoin-f61766b37beb2fecbe3915a72a814cbdb107be0a.tar.xz discoin-f61766b37beb2fecbe3915a72a814cbdb107be0a.zip | |
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 444bd88f8..1904361ba 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(); + } } } } |