Add missing cs_wallet lock that triggers new lock held assertion
A new AssertLockHeld(cs_wallet) call was added in commit a58370e "Dedup nTimeFirstKey update logic" (part of PR #9108). The lock held assertion will fail when loading prexisting wallets files from before the #9108 merge that have watch-only keys. zcash: cherry picked from commit 07afcd6379bb46ace5856f6a47a9188cf9aed2ea zcash: https://github.com/bitcoin/bitcoin/pull/9771
This commit is contained in:
parent
c9e2172eb6
commit
4fd7387cef
|
@ -907,8 +907,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
||||||
bool fNoncriticalErrors = false;
|
bool fNoncriticalErrors = false;
|
||||||
DBErrors result = DB_LOAD_OK;
|
DBErrors result = DB_LOAD_OK;
|
||||||
|
|
||||||
|
LOCK(pwallet->cs_wallet);
|
||||||
try {
|
try {
|
||||||
LOCK(pwallet->cs_wallet);
|
|
||||||
int nMinVersion = 0;
|
int nMinVersion = 0;
|
||||||
if (Read((string)"minversion", nMinVersion))
|
if (Read((string)"minversion", nMinVersion))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue