diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index c6ee93264..beeb2913d 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -165,11 +165,9 @@ trust(pubkey, trust)\n\ { if ( price > SMALLVAL ) { - printf("setprice %.8f\n",price); if ( LP_mypriceset(&changed,base,rel,price) < 0 ) return(clonestr("{\"error\":\"couldnt set price\"}")); - else if ( changed != 0 ) - return(LP_pricepings(ctx,myipaddr,LP_mypubsock,base,rel,price * LP_profitratio)); + else return(LP_pricepings(ctx,myipaddr,LP_mypubsock,base,rel,price * LP_profitratio)); } else return(clonestr("{\"error\":\"no price\"}")); } else if ( strcmp(method,"autoprice") == 0 ) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 2abe38779..e6678b00c 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -200,6 +200,8 @@ char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *re jaddstr(reqjson,"method","postprice"); msg = jprint(reqjson,1); LP_broadcast_message(pubsock,base,rel,zero,msg); + printf("broadcast.(%s)\n",msg); + free(msg); return(clonestr("{\"result\":\"success\"}")); }