Fix Watchonly: cs_main lock not held
This commit is contained in:
parent
29ef389514
commit
39cc4922fe
1 changed files with 3 additions and 3 deletions
|
@ -1075,7 +1075,7 @@ int64_t CWallet::GetWatchOnlyBalance() const
|
||||||
{
|
{
|
||||||
int64_t nTotal = 0;
|
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)
|
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
|
||||||
{
|
{
|
||||||
const CWalletTx* pcoin = &(*it).second;
|
const CWalletTx* pcoin = &(*it).second;
|
||||||
|
@ -1091,7 +1091,7 @@ int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
|
||||||
{
|
{
|
||||||
int64_t nTotal = 0;
|
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)
|
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
|
||||||
{
|
{
|
||||||
const CWalletTx* pcoin = &(*it).second;
|
const CWalletTx* pcoin = &(*it).second;
|
||||||
|
@ -1106,7 +1106,7 @@ int64_t CWallet::GetImmatureWatchOnlyBalance() const
|
||||||
{
|
{
|
||||||
int64_t nTotal = 0;
|
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)
|
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
|
||||||
{
|
{
|
||||||
const CWalletTx* pcoin = &(*it).second;
|
const CWalletTx* pcoin = &(*it).second;
|
||||||
|
|
Loading…
Reference in a new issue