Skip to content

Commit a475285

Browse files
committed
Add missing cs_main lock to VerifyDB
Fixes issue #4139.
1 parent 13d3adb commit a475285

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,6 +2875,7 @@ bool static LoadBlockIndexDB()
28752875

28762876
bool VerifyDB(int nCheckLevel, int nCheckDepth)
28772877
{
2878+
LOCK(cs_main);
28782879
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
28792880
return true;
28802881

0 commit comments

Comments
 (0)