Add missing cs_main lock to VerifyDB

Fixes issue #4139.
This commit is contained in:
Wladimir J. van der Laan 2014-05-07 15:12:31 +02:00
parent 13d3adb651
commit a475285a53
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -2875,6 +2875,7 @@ bool static LoadBlockIndexDB()
bool VerifyDB(int nCheckLevel, int nCheckDepth) bool VerifyDB(int nCheckLevel, int nCheckDepth)
{ {
LOCK(cs_main);
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL) if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
return true; return true;