From b47d43aab27b60956471b677dca9c96c3c71b80f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Sep 2017 19:15:21 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 5 +++-- iguana/exchanges/LP_ordermatch.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 48d3ef687..525a13d5c 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -214,7 +214,7 @@ void _LP_queuesend(uint32_t crc32,int32_t sock0,int32_t sock1,uint8_t *msg,int32 printf("_LP_queuesend0 sent %d instead of %d\n",sentbytes,msglen); else { - printf("Q sent %u msglen.%d\n",crc32,msglen); + //printf("Q sent %u msglen.%d\n",crc32,msglen); sock0 = -1; } } @@ -311,7 +311,8 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25 jdelete(argjson,"method2"); jaddstr(argjson,"method2",method); jaddstr(argjson,"method",method); - //printf("CRC32.%u (%s)\n",crc32,(char *)msg); + if ( strncmp(method,"connect",7) == 0 ) + printf("CRC32.%u (%s)\n",crc32,msgstr); LP_broadcast_finish(pubsock,base,rel,msg,argjson,0); } // else printf("no valid method in (%s)\n",msgstr); free_json(argjson); diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 0b8a24b31..24e99a821 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -762,7 +762,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, jaddbits256(retjson,"pubkey",butxo->S.otherpubkey); jaddstr(retjson,"method","reserved"); msg = jprint(retjson,1); - printf("set swappending.%u accept qprice %.8f, min %.8f\n(%s)",butxo->T.swappending,qprice,price,msg); + printf("set swappending.%u accept qprice %.8f, min %.8f\n(%s)\n",butxo->T.swappending,qprice,price,msg); { bits256 zero; memset(&zero,0,sizeof(zero)); @@ -820,8 +820,8 @@ char *LP_trade(void *ctx,char *myipaddr,int32_t mypubsock,struct LP_quoteinfo *q if ( aliceutxo->S.swap != 0 ) break; sleep(3); - price = LP_query(ctx,myipaddr,mypubsock,"connect",qp); - LP_requestinit(&qp->R,qp->srchash,qp->desthash,qp->srccoin,qp->satoshis-qp->txfee,qp->destcoin,qp->destsatoshis-qp->desttxfee,qp->timestamp,qp->quotetime,DEXselector); + //price = LP_query(ctx,myipaddr,mypubsock,"connect",qp); + //LP_requestinit(&qp->R,qp->srchash,qp->desthash,qp->srccoin,qp->satoshis-qp->txfee,qp->destcoin,qp->destsatoshis-qp->desttxfee,qp->timestamp,qp->quotetime,DEXselector); } if ( aliceutxo->S.swap == 0 ) {