Browse Source

Test

etomic
jl777 7 years ago
parent
commit
c8620d5a3b
  1. 6
      iguana/exchanges/LP_commands.c
  2. 4
      iguana/exchanges/LP_ordermatch.c
  3. 2
      iguana/exchanges/LP_signatures.c

6
iguana/exchanges/LP_commands.c

@ -624,12 +624,8 @@ zeroconf_claim(address, expiration=0)\n\
else if ( strcmp(method,"tradestatus") == 0 )
{
bits256 zero; cJSON *tmpjson; struct LP_quoteinfo Q;
LP_tradecommand_log(argjson);
LP_quoteparse(&Q,argjson);
LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,0);
LP_tradecommand_log(argjson);
printf("%-4d (%-10u %10u) %12s id.%22llu %5s/%-5s %12.8f -> %11.8f price %11.8f | RT.%d %d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount);
printf("%-4d tradestatus | RT.%d %d\n",(uint32_t)time(NULL) % 3600,LP_RTcount,LP_swapscount);
retstr = clonestr("{\"result\":\"success\"}");
}
else if ( strcmp(method,"wantnotify") == 0 )

4
iguana/exchanges/LP_ordermatch.c

@ -496,7 +496,7 @@ int32_t LP_connectstartbob(void *ctx,int32_t pubsock,cJSON *argjson,char *base,c
bits256 zero;
memset(zero.bytes,0,sizeof(zero));
LP_reserved_msg(1,base,rel,zero,jprint(retjson,0));
//LP_reserved_msg(0,base,rel,zero,jprint(retjson,0));
LP_reserved_msg(0,base,rel,zero,jprint(retjson,0));
free_json(retjson);
retval = 0;
} else printf("error launching swaploop\n");
@ -1005,7 +1005,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
bits256 zero;
memset(zero.bytes,0,sizeof(zero));
LP_reserved_msg(1,Q.srccoin,Q.destcoin,zero,clonestr(msg));
//LP_reserved_msg(0,Q.srccoin,Q.destcoin,zero,clonestr(msg));
LP_reserved_msg(0,Q.srccoin,Q.destcoin,zero,clonestr(msg));
free(msg);
butxo->T.lasttime = (uint32_t)time(NULL);
return(retval);

2
iguana/exchanges/LP_signatures.c

@ -723,7 +723,7 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_
memset(&zero,0,sizeof(zero));
LP_reserved_msg(1,qp->srccoin,qp->destcoin,qp->desthash,clonestr(msg));
LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg));
//LP_reserved_msg(0,qp->srccoin,qp->destcoin,zero,clonestr(msg));
LP_reserved_msg(0,qp->srccoin,qp->destcoin,zero,clonestr(msg));
free(msg);
/*portable_mutex_lock(&LP_reservedmutex);
if ( num_Reserved_msgs[1] < sizeof(Reserved_msgs[1])/sizeof(*Reserved_msgs[1])-2 )

Loading…
Cancel
Save