diff --git a/src/init.cpp b/src/init.cpp index 96302dc9..dccbda3b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -726,6 +726,11 @@ bool AppInit2(boost::thread_group& threadGroup) strLoadError = _("Corrupted block database detected"); break; } + + if( mapBlockIndex.size() > 1000 && nBestHeight == 0 ) { + strLoadError = _("mapBlockIndex detected but nBestHeight still zero, trying to repair (reindex)"); + break; + } } catch(std::exception &e) { strLoadError = _("Error opening block database"); break;