|
@ -650,9 +650,11 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price) |
|
|
{ |
|
|
{ |
|
|
if ( fabs(pubp->matrix[basepp->ind][relpp->ind] - price) > SMALLVAL ) |
|
|
if ( fabs(pubp->matrix[basepp->ind][relpp->ind] - price) > SMALLVAL ) |
|
|
printf("PRICEFEED UPDATE.(%s/%s) %.8f %s %.8f\n",base,rel,price,bits256_str(str,pubkey),1./price); |
|
|
printf("PRICEFEED UPDATE.(%s/%s) %.8f %s %.8f\n",base,rel,price,bits256_str(str,pubkey),1./price); |
|
|
pubp->matrix[basepp->ind][relpp->ind] = price; |
|
|
{ |
|
|
dxblend(&basepp->relvals[relpp->ind],price,0.9); |
|
|
pubp->matrix[basepp->ind][relpp->ind] = price; |
|
|
dxblend(&relpp->relvals[basepp->ind],1. / price,0.9); |
|
|
dxblend(&basepp->relvals[relpp->ind],price,0.9); |
|
|
|
|
|
dxblend(&relpp->relvals[basepp->ind],1. / price,0.9); |
|
|
|
|
|
} |
|
|
pubp->timestamp = (uint32_t)time(NULL); |
|
|
pubp->timestamp = (uint32_t)time(NULL); |
|
|
} else printf("error creating pubkey entry\n"); |
|
|
} else printf("error creating pubkey entry\n"); |
|
|
} else printf("error finding %s/%s %.8f\n",base,rel,price); |
|
|
} else printf("error finding %s/%s %.8f\n",base,rel,price); |
|
|