diff --git a/src/komodo.h b/src/komodo.h index c9ee4142c..2d510acae 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -578,8 +578,10 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr if ( (pindex= mapBlockIndex[srchash]) == 0 || pindex->nHeight != *notarizedheightp ) { fprintf(stderr,"FORK detected. notarized.%d %s no in this chain! REWIND to %d\n",*notarizedheightp,srchash.ToString().c_str(),sp->NOTARIZED_HEIGHT); - if ( sp->NOTARIZED_HEIGHT > 0 ) + if ( sp->NOTARIZED_HEIGHT > 0 && sp->NOTARIZED_HEIGHT < *notarized_heightp ) KOMODO_REWIND = sp->NOTARIZED_HEIGHT - 1; + else if ( *notarized_heightp > 101 ) + KOMODO_REWIND = *notarized_heightp - 101; } else validated = 1; if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height && validated != 0 ) {