Merge pull request #5521 from nuttycom/fix_z_getbalance_locking
Fix locking in z_getbalanceforaddress and z_getbalanceforaccount
This commit is contained in:
commit
08dd842087
|
@ -3678,7 +3678,7 @@ UniValue z_getbalanceforaddress(const UniValue& params, bool fHelp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCK(pwalletMain->cs_wallet);
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
|
|
||||||
// Get the receivers for this address.
|
// Get the receivers for this address.
|
||||||
auto selector = pwalletMain->ToZTXOSelector(address, false);
|
auto selector = pwalletMain->ToZTXOSelector(address, false);
|
||||||
|
@ -3780,7 +3780,7 @@ UniValue z_getbalanceforaccount(const UniValue& params, bool fHelp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCK(pwalletMain->cs_wallet);
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
|
|
||||||
// Get the receivers for this account.
|
// Get the receivers for this account.
|
||||||
auto selector = pwalletMain->ZTXOSelectorForAccount(account, false);
|
auto selector = pwalletMain->ZTXOSelectorForAccount(account, false);
|
||||||
|
|
Loading…
Reference in New Issue