Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e64a537d8d
  1. 4
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c
  3. 2
      iguana/exchanges/LP_network.c

4
iguana/exchanges/LP_commands.c

@ -474,7 +474,7 @@ dividends(coin, height, <args>)\n\
retstr = LP_spentcheck(argjson); retstr = LP_spentcheck(argjson);
else if ( strcmp(method,"addr_unspents") == 0 ) else if ( strcmp(method,"addr_unspents") == 0 )
{ {
//printf("GOT ADDR_UNSPENTS\n"); printf("GOT ADDR_UNSPENTS %s %s\n",jstr(argjson,"coin"),jstr(argjson,"address"));
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 ) if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 )
{ {
char *coinaddr; //cJSON *array,*item,*req; int32_t i,n,vout,height; bits256 zero,txid; uint64_t value; char *coinaddr; //cJSON *array,*item,*req; int32_t i,n,vout,height; bits256 zero,txid; uint64_t value;
@ -550,7 +550,7 @@ dividends(coin, height, <args>)\n\
else else
{ {
memset(zero.bytes,0,sizeof(zero)); memset(zero.bytes,0,sizeof(zero));
//printf("broadcast.(%s)\n",msg); printf("broadcast.(%s)\n",Broadcaststr);
LP_reserved_msg(base!=0?base:jstr(argjson,"coin"),rel,zero,jprint(reqjson,0)); LP_reserved_msg(base!=0?base:jstr(argjson,"coin"),rel,zero,jprint(reqjson,0));
} }
retstr = clonestr("{\"result\":\"success\"}"); retstr = clonestr("{\"result\":\"success\"}");

2
iguana/exchanges/LP_nativeDEX.c

@ -710,7 +710,9 @@ int32_t LP_reserved_msgs()
if ( nn_poll(&pfd,1,1) != 1 ) if ( nn_poll(&pfd,1,1) != 1 )
break;*/ break;*/
num_Reserved_msgs--; num_Reserved_msgs--;
#ifdef __APPLE__
printf("%d BROADCASTING RESERVED.(%s)\n",num_Reserved_msgs,Reserved_msgs[num_Reserved_msgs]); printf("%d BROADCASTING RESERVED.(%s)\n",num_Reserved_msgs,Reserved_msgs[num_Reserved_msgs]);
#endif
LP_broadcast_message(LP_mypubsock,"","",zero,Reserved_msgs[num_Reserved_msgs]); LP_broadcast_message(LP_mypubsock,"","",zero,Reserved_msgs[num_Reserved_msgs]);
Reserved_msgs[num_Reserved_msgs] = 0; Reserved_msgs[num_Reserved_msgs] = 0;
n++; n++;

2
iguana/exchanges/LP_network.c

@ -158,7 +158,9 @@ void queue_loop(void *ignore)
{ {
if ( (sentbytes= nn_send(ptr->sock,ptr->msg,ptr->msglen,0)) != ptr->msglen ) if ( (sentbytes= nn_send(ptr->sock,ptr->msg,ptr->msglen,0)) != ptr->msglen )
printf("%d LP_send sent %d instead of %d\n",n,sentbytes,ptr->msglen); printf("%d LP_send sent %d instead of %d\n",n,sentbytes,ptr->msglen);
#ifdef __APPLE__
else printf("%d %p qsent %u msglen.%d peerind.%d (%s)\n",n,ptr,ptr->crc32,ptr->msglen,ptr->peerind,ptr->msg); else printf("%d %p qsent %u msglen.%d peerind.%d (%s)\n",n,ptr,ptr->crc32,ptr->msglen,ptr->peerind,ptr->msg);
#endif
ptr->sock = -1; ptr->sock = -1;
if ( ptr->peerind > 0 ) if ( ptr->peerind > 0 )
ptr->starttime = (uint32_t)time(NULL); ptr->starttime = (uint32_t)time(NULL);

Loading…
Cancel
Save