|
|
@ -489,7 +489,7 @@ char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *re |
|
|
|
char *LP_postprice_recv(cJSON *argjson) |
|
|
|
{ |
|
|
|
bits256 pubkey; double price; char *base,*rel; |
|
|
|
printf("PRICE POSTED.(%s)\n",jprint(argjson,0)); |
|
|
|
//printf("PRICE POSTED.(%s)\n",jprint(argjson,0));
|
|
|
|
if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 && (price= jdouble(argjson,"price")) > SMALLVAL ) |
|
|
|
{ |
|
|
|
pubkey = jbits256(argjson,"pubkey"); |
|
|
@ -497,7 +497,7 @@ char *LP_postprice_recv(cJSON *argjson) |
|
|
|
{ |
|
|
|
if ( LP_price_sigcheck(juint(argjson,"timestamp"),jstr(argjson,"sig"),jstr(argjson,"pubsecp"),pubkey,base,rel,j64bits(argjson,"price64")) == 0 ) |
|
|
|
{ |
|
|
|
printf("call pricefeed update\n"); |
|
|
|
//printf("call pricefeed update\n");
|
|
|
|
LP_pricefeedupdate(pubkey,base,rel,price,jstr(argjson,"utxocoin"),jint(argjson,"n"),jdouble(argjson,"bal")*SATOSHIDEN,jdouble(argjson,"min")*SATOSHIDEN,jdouble(argjson,"max")*SATOSHIDEN); |
|
|
|
return(clonestr("{\"result\":\"success\"}")); |
|
|
|
} |
|
|
|