mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
Don't try to verify a non-existent wallet.dat
This commit is contained in:
parent
eed1785f70
commit
d0b3e77a08
1 changed files with 12 additions and 9 deletions
|
@ -507,6 +507,8 @@ bool AppInit2()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (filesystem::exists(GetDataDir() / "wallet.dat"))
|
||||||
|
{
|
||||||
CDBEnv::VerifyResult r = bitdb.Verify("wallet.dat", CWalletDB::Recover);
|
CDBEnv::VerifyResult r = bitdb.Verify("wallet.dat", CWalletDB::Recover);
|
||||||
if (r == CDBEnv::RECOVER_OK)
|
if (r == CDBEnv::RECOVER_OK)
|
||||||
{
|
{
|
||||||
|
@ -518,6 +520,7 @@ bool AppInit2()
|
||||||
}
|
}
|
||||||
if (r == CDBEnv::RECOVER_FAIL)
|
if (r == CDBEnv::RECOVER_FAIL)
|
||||||
return InitError(_("wallet.dat corrupt, salvage failed"));
|
return InitError(_("wallet.dat corrupt, salvage failed"));
|
||||||
|
}
|
||||||
|
|
||||||
// ********************************************************* Step 6: network initialization
|
// ********************************************************* Step 6: network initialization
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue