diff --git a/src/komodo.h b/src/komodo.h index 300654a26..0e1ef6ac4 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -300,7 +300,7 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen, komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0); } else printf("reject ht.%d NOTARIZED.%d %s.%s DESTTXID.%s (%s)\n",height,*notarizedheightp,KOMODO_SOURCE,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]); } - else if ( i == 0 && (scriptbuf[len] == 'P' || opretlen == 149) ) + else if ( i == 0 && opretlen == 149 ) komodo_paxpricefeed(height,&scriptbuf[len + scriptbuf[len] == 'P'],opretlen); else { diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 2f166d791..dbbfd7f58 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -53,7 +53,7 @@ void komodo_gateway_voutupdate(char *symbol,int32_t isspecial,int32_t height,int offset += komodo_scriptitemlen(&opretlen,&script[offset]); if ( isspecial != 0 && len >= offset+32*2+4 && strcmp((char *)&script[offset+32*2+4],"KMD") == 0 ) typestr = "notarized"; - else if ( txi == 0 && (script[offset] == 'P' || opretlen == 149) ) + else if ( txi == 0 && vout == 1 && opretlen == 149 ) { typestr = "pricefeed"; komodo_paxpricefeed(height,&script[len + script[offset] == 'P'],opretlen); diff --git a/src/komodo_pax.h b/src/komodo_pax.h index ef2d5b260..294f70cfd 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -74,7 +74,7 @@ int32_t dpow_readprices(uint8_t *data,uint32_t *timestampp,double *KMDBTCp,doubl uint32_t kmdbtc,btcusd,cnyusd; int32_t i,n,nonz,len = 0; len += iguana_rwnum(0,&data[len],sizeof(uint32_t),(void *)timestampp); len += iguana_rwnum(0,&data[len],sizeof(uint32_t),(void *)&n); - if ( n != 32 ) + if ( n != 35 ) { printf("dpow_readprices illegal n.%d\n",n); return(-1);