test
This commit is contained in:
11
src/komodo.h
11
src/komodo.h
@@ -603,6 +603,8 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,
|
||||
opretlen = (opretlen << 8) + scriptbuf[len++];
|
||||
}
|
||||
if ( opretlen >= 32*2+4 )
|
||||
{
|
||||
if ( strcmp("KMD",(char *)&scriptbuf[len+32*2+4]) == 0 )
|
||||
{
|
||||
len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&kmdtxid);
|
||||
len += iguana_rwnum(0,&scriptbuf[len],4,(uint8_t *)notarizedheightp);
|
||||
@@ -610,7 +612,7 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,
|
||||
//for (k=0; k<scriptlen; k++)
|
||||
// printf("%02x",scriptbuf[k]);
|
||||
//printf(" <- script ht.%d i.%d j.%d\n",height,i,j);
|
||||
printf("ht.%d NOTARIZED.%d KMD.%s BTCTXID.%s\n",height,*notarizedheightp,kmdtxid.ToString().c_str(),btctxid.ToString().c_str());
|
||||
printf("ht.%d NOTARIZED.%d KMD.%s BTCTXID.%s (%s)\n",height,*notarizedheightp,kmdtxid.ToString().c_str(),btctxid.ToString().c_str(),(char *)&scriptbuf[len+32*2+4]);
|
||||
if ( *notarizedheightp > NOTARIZED_HEIGHT )
|
||||
{
|
||||
static uint256 zero;
|
||||
@@ -620,6 +622,13 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,
|
||||
komodo_stateupdate(height,0,0,0,zero,0,0);
|
||||
}
|
||||
}
|
||||
else if ( i == 0 && scriptbuf[len] == 'P' )
|
||||
{
|
||||
double KMDBTC,BTCUSD,CNYUSD; uint32_t numprices,timestamp,pvals[128];
|
||||
numprices = dpow_readprices(&scriptbuf[++len],×tamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);
|
||||
printf("Found OP_RETURN prices\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
return(notaryid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user