aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-14 08:30:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-14 08:50:29 +0200
commit77ed583f0f12fd160613feae495663ff538315d3 (patch)
tree9f04f837c7f5b15e66160ad83381ccdca0ba2f46
parent3554df9b99e87796e320ce7121594935f6de8617 (diff)
parent39cc4922fe30a93d10665d913e2e3d51fb94561a (diff)
downloadbitcoin-77ed583f0f12fd160613feae495663ff538315d3.tar.xz
Merge pull request #4520
39cc492 Fix Watchonly: cs_main lock not held (Cozz Lovan)
-rw-r--r--src/wallet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 8fdc5f4b20..560cbc10b9 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -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
{
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
{
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;