jl777 7 years ago
parent
commit
b20d39f863
  1. 5
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_rpc.c

5
iguana/exchanges/LP_ordermatch.c

@ -696,10 +696,11 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
char *method,*msg; cJSON *retjson; double qprice,price,bid,ask; struct LP_utxoinfo A,B,*autxo,*butxo; struct LP_address_utxo **utxos; struct LP_quoteinfo Q; int32_t retval = -1,max=10000;
if ( (method= jstr(argjson,"method")) != 0 && (strcmp(method,"request") == 0 ||strcmp(method,"connect") == 0) )
{
printf("TRADECOMMAND.(%s)\n",jprint(argjson,0));
retval = 1;
if ( LP_quoteparse(&Q,argjson) == 0 && bits256_cmp(LP_mypub25519,Q.srchash) == 0 )
printf("LP_tradecommand: check received %s\n",method);
if ( LP_quoteparse(&Q,argjson) == 0 && bits256_cmp(LP_mypub25519,Q.srchash) == 0 && bits256_cmp(LP_mypub25519,Q.desthash) != 0 )
{
printf("TRADECOMMAND.(%s)\n",jprint(argjson,0));
if ( (price= LP_myprice(&bid,&ask,Q.srccoin,Q.destcoin)) <= SMALLVAL || ask <= SMALLVAL )
{
printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin);

2
iguana/exchanges/LP_rpc.c

@ -506,7 +506,7 @@ void LP_listunspent_issue(char *symbol,char *coinaddr)
if ( strcmp(coin->smartaddr,coinaddr) == 0 )
{
retjson = LP_listunspent(symbol,coinaddr);
printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr);
//printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr);
}
else if ( (destport= LP_randpeer(destip)) > 0 )
{

Loading…
Cancel
Save