aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-01-08 17:36:15 +0100
committerWladimir J. van der Laan <[email protected]>2016-01-08 17:36:19 +0100
commit9de541a9c95a47c3f5c9e443a0ad3040b9791a2f (patch)
tree95e2328daea9b67b38cb7db0216602a506322cec /src
parentMerge pull request #7317 (diff)
parentMake sure conflicted wallet tx's update balances (diff)
downloaddiscoin-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.cpp7
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();
+ }
}
}
}