Make sure conflicted wallet tx's update balances

Github-Pull: #7306
Rebased-From: f61766b37beb2fecbe3915a72a814cbdb107be0a
This commit is contained in:
Alex Morcos 2016-01-06 17:24:30 -05:00 committed by Wladimir J. van der Laan
parent 9265e89a77
commit 4707797df2
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -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();
}
}
}
}