Test
This commit is contained in:
@@ -578,6 +578,8 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
|||||||
if ( (pindex= mapBlockIndex[srchash]) == 0 || pindex->nHeight != *notarizedheightp )
|
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);
|
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 )
|
||||||
|
KOMODO_REWIND = sp->NOTARIZED_HEIGHT - 1;
|
||||||
} else validated = 1;
|
} else validated = 1;
|
||||||
if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height && validated != 0 )
|
if ( notarized != 0 && *notarizedheightp > sp->NOTARIZED_HEIGHT && *notarizedheightp < height && validated != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3079,9 +3079,10 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
|
|||||||
}
|
}
|
||||||
if ( KOMODO_REWIND != 0 )
|
if ( KOMODO_REWIND != 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"rewind start ht.%d\n",chainActive.Tip()->nHeight);
|
fprintf(stderr,">>>>>>>>>>> rewind start ht.%d\n",chainActive.Tip()->nHeight);
|
||||||
while ( KOMODO_REWIND > 0 && chainActive.Tip()->nHeight > KOMODO_REWIND )
|
while ( KOMODO_REWIND > 0 && chainActive.Tip()->nHeight > KOMODO_REWIND )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,"%d ",(int32_t)chainActive.Tip()->nHeight);
|
||||||
if ( !DisconnectTip(state) )
|
if ( !DisconnectTip(state) )
|
||||||
{
|
{
|
||||||
InvalidateBlock(state,chainActive.Tip());
|
InvalidateBlock(state,chainActive.Tip());
|
||||||
@@ -3089,7 +3090,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr,"reached rewind.%d, best to do: ./komodo-cli stop\n",KOMODO_REWIND);
|
fprintf(stderr,"reached rewind.%d, best to do: ./komodo-cli stop\n",KOMODO_REWIND);
|
||||||
sleep(300);
|
sleep(60);
|
||||||
KOMODO_REWIND = 0;
|
KOMODO_REWIND = 0;
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user