Add longest chain check

This commit is contained in:
miketout
2018-08-26 14:15:06 -07:00
parent 24dd56729b
commit 21337a4992

View File

@@ -1954,9 +1954,10 @@ bool IsInSync()
}
}
pbi = chainActive.Tip();
if ( !pbi )
return false;
else if ( pindexBestHeader == 0 || ((pindexBestHeader->nHeight - 1) > pbi->nHeight) )
if ( !pbi ||
(pindexBestHeader == 0) ||
((pindexBestHeader->nHeight - 1) > pbi->nHeight) ||
(komodo_longestchain() != 0 && komodo_longestchain() > pbi->nHeight) )
return false;
return true;