Browse Source

Merge pull request #4520

39cc492 Fix Watchonly: cs_main lock not held (Cozz Lovan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
77ed583f0f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 6
      src/wallet.cpp

6
src/wallet.cpp

@ -1075,7 +1075,7 @@ int64_t CWallet::GetWatchOnlyBalance() const @@ -1075,7 +1075,7 @@ int64_t CWallet::GetWatchOnlyBalance() const
{
int64_t nTotal = 0;
{
LOCK(cs_wallet);
LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
@ -1091,7 +1091,7 @@ int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const @@ -1091,7 +1091,7 @@ int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
{
int64_t nTotal = 0;
{
LOCK(cs_wallet);
LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
@ -1106,7 +1106,7 @@ int64_t CWallet::GetImmatureWatchOnlyBalance() const @@ -1106,7 +1106,7 @@ int64_t CWallet::GetImmatureWatchOnlyBalance() const
{
int64_t nTotal = 0;
{
LOCK(cs_wallet);
LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;

Loading…
Cancel
Save