jl777 7 years ago
parent
commit
b47d43aab2
  1. 5
      iguana/exchanges/LP_network.c
  2. 6
      iguana/exchanges/LP_ordermatch.c

5
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);

6
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 )
{

Loading…
Cancel
Save