jl777 7 years ago
parent
commit
280924f3a1
  1. 5
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_socket.c
  3. 2
      iguana/exchanges/LP_utxo.c

5
iguana/exchanges/LP_ordermatch.c

@ -334,7 +334,7 @@ int32_t LP_arrayfind(cJSON *array,bits256 txid,int32_t vout)
double LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_quoteinfo *qp)
{
cJSON *reqjson; char *msg,*msg2; int32_t i,flag = 0; double price = 0.; struct LP_utxoinfo *utxo;
cJSON *reqjson; bits256 zero; char *msg,*msg2; int32_t i,flag = 0; double price = 0.; struct LP_utxoinfo *utxo;
if ( strcmp(method,"request") == 0 )
{
if ( (utxo= LP_utxofind(0,qp->desttxid,qp->destvout)) != 0 && LP_ismine(utxo) > 0 && LP_isavailable(utxo) > 0 )
@ -354,7 +354,8 @@ double LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct L
msg2 = clonestr(msg);
printf("QUERY.(%s)\n",msg);
LP_broadcast_message(LP_mypubsock,qp->srccoin,qp->destcoin,qp->srchash,msg);
LP_broadcast_message(-1,qp->srccoin,qp->destcoin,qp->srchash,msg2);
memset(&zero,0,sizeof(zero));
LP_broadcast_message(LP_mypubsock,qp->srccoin,qp->destcoin,zero,msg2);
for (i=0; i<30; i++)
{
if ( (price= LP_pricecache(qp,qp->srccoin,qp->destcoin,qp->txid,qp->vout)) > SMALLVAL )

2
iguana/exchanges/LP_socket.c

@ -310,7 +310,7 @@ int32_t electrum_process_array(struct iguana_info *coin,struct electrum_info *ep
int32_t i,v,n,flag = 0; char str[65]; uint64_t value; bits256 txid; cJSON *item,*txobj; struct LP_transaction *tx;
if ( array != 0 && coin != 0 && (n= cJSON_GetArraySize(array)) > 0 )
{
printf("PROCESS %s/%s %s num.%d\n",coin->symbol,ep!=0?ep->symbol:"nanolistunspent",coinaddr,n);
//printf("PROCESS %s/%s %s num.%d\n",coin->symbol,ep!=0?ep->symbol:"nanolistunspent",coinaddr,n);
for (i=0; i<n; i++)
{
item = jitem(array,i);

2
iguana/exchanges/LP_utxo.c

@ -81,7 +81,7 @@ struct LP_address *_LP_addressadd(struct iguana_info *coin,char *coinaddr)
struct LP_address *ap;
ap = calloc(1,sizeof(*ap));
safecopy(ap->coinaddr,coinaddr,sizeof(ap->coinaddr));
printf("LP_ADDRESS %s ADD.(%s)\n",coin->symbol,coinaddr);
//printf("LP_ADDRESS %s ADD.(%s)\n",coin->symbol,coinaddr);
HASH_ADD_KEYPTR(hh,coin->addresses,ap->coinaddr,strlen(ap->coinaddr),ap);
return(ap);
}

Loading…
Cancel
Save