AvailableCoins: acquire cs_main mutex

It's required when called from WalletModel

Rebased-From: ea3acaf
This commit is contained in:
Pavel Vasin 2014-06-20 16:32:57 +04:00 committed by Wladimir J. van der Laan
parent 44d8e093ca
commit 0a6dcae508

View File

@ -1012,7 +1012,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
vCoins.clear(); vCoins.clear();
{ {
LOCK(cs_wallet); LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{ {
const uint256& wtxid = it->first; const uint256& wtxid = it->first;