Do not use longestchain in IsNotInSync

This commit is contained in:
Duke Leto
2020-11-14 19:59:38 -05:00
parent 697ed53c66
commit bd70683491

View File

@@ -2473,11 +2473,8 @@ int IsNotInSync()
}
CBlockIndex *pbi = chainActive.Tip();
int longestchain = komodo_longestchain();
if ( !pbi ||
(pindexBestHeader == 0) ||
((pindexBestHeader->GetHeight() - 1) > pbi->GetHeight()) ||
(longestchain != 0 && longestchain > pbi->GetHeight()) )
if ( !pbi || (pindexBestHeader == 0) ||
((pindexBestHeader->GetHeight() - 1) > pbi->GetHeight()) )
{
return (pbi && pindexBestHeader && (pindexBestHeader->GetHeight() - 1) > pbi->GetHeight()) ?
pindexBestHeader->GetHeight() - pbi->GetHeight() :