Browse Source

Test

etomic
jl777 7 years ago
parent
commit
786d194ab7
  1. 1
      iguana/exchanges/LP_commands.c
  2. 1
      iguana/exchanges/LP_ordermatch.c
  3. 4
      iguana/exchanges/LP_rpc.c

1
iguana/exchanges/LP_commands.c

@ -418,6 +418,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");
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;

1
iguana/exchanges/LP_ordermatch.c

@ -252,6 +252,7 @@ void LP_listunspent_query(char *symbol,char *coinaddr)
jaddstr(reqjson,"coin",symbol); jaddstr(reqjson,"coin",symbol);
jaddstr(reqjson,"address",coinaddr); jaddstr(reqjson,"address",coinaddr);
msg = jprint(reqjson,1); msg = jprint(reqjson,1);
printf("BROADCAST.(%s)\n",msg);
LP_broadcast_message(LP_mypubsock,"","",zero,msg); LP_broadcast_message(LP_mypubsock,"","",zero,msg);
} }

4
iguana/exchanges/LP_rpc.c

@ -460,12 +460,12 @@ int32_t LP_listunspent_issue(char *symbol,char *coinaddr)
retjson = LP_listunspent(symbol,coinaddr); retjson = LP_listunspent(symbol,coinaddr);
//printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr); //printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr);
} }
else if ( (destport= LP_randpeer(destip)) > 0 ) /*else if ( (destport= LP_randpeer(destip)) > 0 )
{ {
retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr); retstr = issue_LP_listunspent(destip,destport,symbol,coinaddr);
printf("issue %s %s %s -> (%s)\n",coin->symbol,coinaddr,destip,retstr); printf("issue %s %s %s -> (%s)\n",coin->symbol,coinaddr,destip,retstr);
retjson = cJSON_Parse(retstr); retjson = cJSON_Parse(retstr);
} else printf("LP_listunspent_issue couldnt get a random peer?\n"); } else printf("LP_listunspent_issue couldnt get a random peer?\n");*/
if ( retjson != 0 ) if ( retjson != 0 )
{ {
n = cJSON_GetArraySize(retjson); n = cJSON_GetArraySize(retjson);

Loading…
Cancel
Save