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 ).

The lock held assertion will fail when loading prexisting wallets files from
before the  merge that have watch-only keys.
This commit is contained in:
Russell Yanofsky 2017-02-15 17:01:30 -05:00
parent 7a93af8340
commit 07afcd6379

View file

@ -559,8 +559,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
bool fNoncriticalErrors = false;
DBErrors result = DB_LOAD_OK;
LOCK(pwallet->cs_wallet);
try {
LOCK(pwallet->cs_wallet);
int nMinVersion = 0;
if (Read((string)"minversion", nMinVersion))
{