test
This commit is contained in:
@@ -124,7 +124,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
|||||||
{
|
{
|
||||||
//printf("D[%d]\n",ht);
|
//printf("D[%d]\n",ht);
|
||||||
}
|
}
|
||||||
#ifdef KOMODO_PAX
|
//#ifdef KOMODO_PAX
|
||||||
else if ( func == 'V' )
|
else if ( func == 'V' )
|
||||||
{
|
{
|
||||||
int32_t numpvals; uint32_t pvals[128];
|
int32_t numpvals; uint32_t pvals[128];
|
||||||
@@ -135,7 +135,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
|||||||
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
||||||
} else printf("error loading pvals[%d]\n",numpvals);
|
} else printf("error loading pvals[%d]\n",numpvals);
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
else printf("illegal func.(%d %c)\n",func,func);
|
else printf("illegal func.(%d %c)\n",func,func);
|
||||||
}
|
}
|
||||||
} else fp = fopen(fname,"wb+");
|
} else fp = fopen(fname,"wb+");
|
||||||
@@ -199,7 +199,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
|||||||
errs++;
|
errs++;
|
||||||
komodo_nutxoadd(height,notaryid,txhash,voutmask,numvouts);
|
komodo_nutxoadd(height,notaryid,txhash,voutmask,numvouts);
|
||||||
}
|
}
|
||||||
#ifdef KOMODO_PAX
|
//#ifdef KOMODO_PAX
|
||||||
else if ( pvals != 0 && numpvals > 0 )
|
else if ( pvals != 0 && numpvals > 0 )
|
||||||
{
|
{
|
||||||
fputc('V',fp);
|
fputc('V',fp);
|
||||||
@@ -211,7 +211,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
|||||||
komodo_pvals(height,pvals,numpvals);
|
komodo_pvals(height,pvals,numpvals);
|
||||||
//printf("save pvals height.%d numpvals.%d\n",height,numpvals);
|
//printf("save pvals height.%d numpvals.%d\n",height,numpvals);
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
else if ( height != 0 )
|
else if ( height != 0 )
|
||||||
{
|
{
|
||||||
//printf("func N ht.%d errs.%d\n",NOTARIZED_HEIGHT,errs);
|
//printf("func N ht.%d errs.%d\n",NOTARIZED_HEIGHT,errs);
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen)
|
const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen)
|
||||||
{
|
{
|
||||||
uint8_t rmd160[20],addrtype,shortflag,pubkey33[33]; int32_t i; char base[4],coinaddr[64],destaddr[64]; int64_t fiatoshis,checktoshis; const char *typestr = "unknown";
|
uint8_t rmd160[20],addrtype,shortflag,pubkey33[33]; int32_t i; char base[4],coinaddr[64],destaddr[64]; int64_t fiatoshis,checktoshis; const char *typestr = "unknown";
|
||||||
|
if ( opretlen == 72 )
|
||||||
|
return("notarized");
|
||||||
printf("komodo_opreturn[%c]: ht.%d %.8f opretlen.%d\n",opretbuf[0],height,dstr(value),opretlen);
|
printf("komodo_opreturn[%c]: ht.%d %.8f opretlen.%d\n",opretbuf[0],height,dstr(value),opretlen);
|
||||||
if ( opretbuf[0] == 'D' )
|
if ( opretbuf[0] == 'D' )
|
||||||
{
|
{
|
||||||
@@ -47,13 +49,13 @@ void komodo_gateway_voutupdate(char *symbol,int32_t height,int32_t txi,int32_t v
|
|||||||
typestr = "unknown";
|
typestr = "unknown";
|
||||||
if ( script[offset++] == 0x6a )
|
if ( script[offset++] == 0x6a )
|
||||||
{
|
{
|
||||||
if ( len >= 32*2+4 && strcmp((char *)&script[1+32*2+4],"KMD") == 0 )
|
offset += komodo_scriptitemlen(&opretlen,&script[offset]);
|
||||||
|
if ( len >= offset+32*2+4 && strcmp((char *)&script[offset+32*2+4],"KMD") == 0 )
|
||||||
typestr = "notarized";
|
typestr = "notarized";
|
||||||
if ( script[2] == 'P' )
|
if ( script[2] == 'P' )
|
||||||
typestr = "pricefeed";
|
typestr = "pricefeed";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
offset += komodo_scriptitemlen(&opretlen,&script[offset]);
|
|
||||||
if ( script[offset] == 'P' )
|
if ( script[offset] == 'P' )
|
||||||
komodo_paxpricefeed(height,&script[++offset],opretlen);
|
komodo_paxpricefeed(height,&script[++offset],opretlen);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user