diff --git a/src/komodo.h b/src/komodo.h index ec4b8b57a..9b2c4052f 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -124,7 +124,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar { //printf("D[%d]\n",ht); } -#ifdef KOMODO_PAX +//#ifdef KOMODO_PAX else if ( func == 'V' ) { 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); } else printf("error loading pvals[%d]\n",numpvals); } -#endif +//#endif else printf("illegal func.(%d %c)\n",func,func); } } else fp = fopen(fname,"wb+"); @@ -199,7 +199,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar errs++; komodo_nutxoadd(height,notaryid,txhash,voutmask,numvouts); } -#ifdef KOMODO_PAX +//#ifdef KOMODO_PAX else if ( pvals != 0 && numpvals > 0 ) { 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); //printf("save pvals height.%d numpvals.%d\n",height,numpvals); } -#endif +//#endif else if ( height != 0 ) { //printf("func N ht.%d errs.%d\n",NOTARIZED_HEIGHT,errs); diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 83e5a6902..7652a4657 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -20,6 +20,8 @@ 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"; + if ( opretlen == 72 ) + return("notarized"); printf("komodo_opreturn[%c]: ht.%d %.8f opretlen.%d\n",opretbuf[0],height,dstr(value),opretlen); 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"; 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"; if ( script[2] == 'P' ) typestr = "pricefeed"; else { - offset += komodo_scriptitemlen(&opretlen,&script[offset]); if ( script[offset] == 'P' ) komodo_paxpricefeed(height,&script[++offset],opretlen); else