From 21337a4992408c53b7db7d7e8f67ed1b691473fe Mon Sep 17 00:00:00 2001 From: miketout Date: Sun, 26 Aug 2018 14:15:06 -0700 Subject: [PATCH] Add longest chain check --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8e5625ab8..9dbcd6dbf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;