aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-01-06 17:24:30 -0500
committerAlex Morcos <morcos@chaincode.com>2016-01-06 17:24:30 -0500
commitf61766b37beb2fecbe3915a72a814cbdb107be0a (patch)
tree33a24a05af0914dfc37bcfbf8964686f93a35c77 /src
parent605c17844ea32b6d237db6d83871164dc7d59dab (diff)
downloadbitcoin-f61766b37beb2fecbe3915a72a814cbdb107be0a.tar.xz
Make sure conflicted wallet tx's update balances
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 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();
+ }
}
}
}