Test
This commit is contained in:
12
src/komodo.h
12
src/komodo.h
@@ -591,7 +591,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
||||
notarized = 1;
|
||||
if ( strcmp("PIZZA",ccdata.symbol) == 0 )
|
||||
notarized = 1;
|
||||
if ( opretlen != 149 )
|
||||
if ( 0 && opretlen != 149 )
|
||||
printf("[%s].%d (%s) matched.%d i.%d j.%d notarized.%d %llx opretlen.%d len.%d offset.%d opoffset.%d\n",ASSETCHAINS_SYMBOL,height,ccdata.symbol,matched,i,j,notarized,(long long)signedmask,opretlen,len,offset,opoffset);
|
||||
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&srchash);
|
||||
len += iguana_rwnum(0,&scriptbuf[len],sizeof(*notarizedheightp),(uint8_t *)notarizedheightp);
|
||||
@@ -625,9 +625,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
||||
ccdata.notarized_height = *notarizedheightp;
|
||||
ccdata.height = height;
|
||||
ccdata.txi = i;
|
||||
printf("nameoffset.%d len.%d + 36 %d vs opretlen.%d\n",nameoffset,len,len+36,opretlen);
|
||||
//nameoffset.4 len.43 + 36 79 vs opretlen.76
|
||||
//[].783861 (BOTS) matched.0 i.7 j.1 notarized.1 40001f140380 opretlen.77 (B O T)
|
||||
//printf("nameoffset.%d len.%d + 36 %d vs opretlen.%d\n",nameoffset,len,len+36,opretlen);
|
||||
if ( len+36-opoffset <= opretlen )
|
||||
{
|
||||
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&MoM);
|
||||
@@ -670,7 +668,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
||||
else
|
||||
{
|
||||
komodo_rwccdata(ASSETCHAINS_SYMBOL,1,&ccdata);
|
||||
printf("[%s] matched.%d VALID (%s) MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,matched,ccdata.symbol,MoM.ToString().c_str(),MoMdepth);
|
||||
//printf("[%s] matched.%d VALID (%s) MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,matched,ccdata.symbol,MoM.ToString().c_str(),MoMdepth);
|
||||
}
|
||||
if ( ccdata.pairs != 0 )
|
||||
free(ccdata.pairs);
|
||||
@@ -686,7 +684,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
||||
sp->MoM = MoM;
|
||||
sp->MoMdepth = MoMdepth;
|
||||
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,sp->MoM,sp->MoMdepth);
|
||||
//if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d) MoM.%s %d\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,srchash.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len,sp->MoM.ToString().c_str(),sp->MoMdepth);
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||
{
|
||||
@@ -713,7 +711,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( matched != 0 && *notarizedheightp != sp->NOTARIZED_HEIGHT )
|
||||
} else //if ( matched != 0 && *notarizedheightp != sp->NOTARIZED_HEIGHT )
|
||||
printf("validated.%d notarized.%d %llx reject ht.%d NOTARIZED.%d prev.%d %s.%s DESTTXID.%s len.%d opretlen.%d\n",validated,notarized,(long long)signedmask,height,*notarizedheightp,sp->NOTARIZED_HEIGHT,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,srchash.ToString().c_str(),desttxid.ToString().c_str(),len,opretlen);
|
||||
}
|
||||
else if ( matched != 0 && i == 0 && j == 1 && opretlen == 149 )
|
||||
|
||||
@@ -30,11 +30,14 @@ struct komodo_ccdata
|
||||
|
||||
int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccdata)
|
||||
{
|
||||
bits256 hash; int32_t i;
|
||||
if ( rwflag == 0 )
|
||||
{
|
||||
|
||||
}
|
||||
char str[65]; fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d numpairs.%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->notarized_height,bits256_str(str,*(bits256 *)&ccdata->MoM),ccdata->height,ccdata->txi,ccdata->numpairs);
|
||||
for (i=0; i<32; i++)
|
||||
hash[i] = ((uint8_t *)&ccdata->MoM)[31-i];
|
||||
char str[65]; fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d numpairs.%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->notarized_height,bits256_str(str,hash),ccdata->height,ccdata->txi,ccdata->numpairs);
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -3090,7 +3090,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"reached rewind.%d, best to do: ./komodo-cli -ac_name=%s stop\n",KOMODO_REWIND,ASSETCHAINS_SYMBOL);
|
||||
sleep(60);
|
||||
sleep(20);
|
||||
fprintf(stderr,"resuming normal operations\n");
|
||||
KOMODO_REWIND = 0;
|
||||
return(true);
|
||||
|
||||
Reference in New Issue
Block a user