This commit is contained in:
jl777
2016-10-26 10:26:43 -03:00
parent 47e5cbc130
commit cd1fcb48d9
3 changed files with 3 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,
}
#ifdef KOMODO_PAX
else if ( i == 0 && scriptbuf[len] == 'P' )
komodo_paxpricefeed(&scriptbuf[++len]);
komodo_paxpricefeed(height,&scriptbuf[++len],opretlen);
#endif
}
return(notaryid);

View File

@@ -50,7 +50,7 @@ void komodo_gateway_voutupdate(char *symbol,int32_t height,int32_t txi,int32_t v
{
offset += komodo_scriptitemlen(&opretlen,&script[offset]);
if ( script[offset] == 'P' )
komodo_paxpricefeed(&script[++offset]);
komodo_paxpricefeed(height,&script[++offset],opretlen);
else
{
printf("offset.%d opretlen.%d\n",offset,opretlen);

View File

@@ -298,7 +298,7 @@ int32_t komodo_paxprices(int32_t *heights,uint64_t *prices,int32_t max,char *bas
return(num);
}
void komodo_paxpricefeed(uint8_t *pricefeed)
void komodo_paxpricefeed(int32_t height,uint8_t *pricefeed,int32_t opretlen)
{
double KMDBTC,BTCUSD,CNYUSD; uint32_t numpvals,timestamp,pvals[128]; uint256 zero;
numpvals = dpow_readprices(pricefeed,&timestamp,&KMDBTC,&BTCUSD,&CNYUSD,pvals);