diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-01-08 17:36:15 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-01-08 17:36:19 +0100 |
| commit | 9de541a9c95a47c3f5c9e443a0ad3040b9791a2f (patch) | |
| tree | 95e2328daea9b67b38cb7db0216602a506322cec /src | |
| parent | Merge pull request #7317 (diff) | |
| parent | Make sure conflicted wallet tx's update balances (diff) | |
| download | discoin-9de541a9c95a47c3f5c9e443a0ad3040b9791a2f.tar.xz discoin-9de541a9c95a47c3f5c9e443a0ad3040b9791a2f.zip | |
Merge pull request #7306
f61766b Make sure conflicted wallet tx's update balances (Alex Morcos)
Diffstat (limited to 'src')
| -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(); + } } } } |