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(); pbi = chainActive.Tip();
if ( !pbi ) if ( !pbi ||
return false; (pindexBestHeader == 0) ||
else if ( pindexBestHeader == 0 || ((pindexBestHeader->nHeight - 1) > pbi->nHeight) ) ((pindexBestHeader->nHeight - 1) > pbi->nHeight) ||
(komodo_longestchain() != 0 && komodo_longestchain() > pbi->nHeight) )
return false; return false;
return true; return true;