Browse Source

Test

etomic
jl777 7 years ago
parent
commit
14b6e3acc7
  1. 2
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c
  3. 3
      iguana/exchanges/LP_signatures.c

2
iguana/exchanges/LP_commands.c

@ -36,7 +36,7 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *r
{ {
char *method,*userpass,*base,*rel,*coin,*retstr = 0; int32_t changed,flag = 0; cJSON *retjson,*reqjson = 0; struct iguana_info *ptr; char *method,*userpass,*base,*rel,*coin,*retstr = 0; int32_t changed,flag = 0; cJSON *retjson,*reqjson = 0; struct iguana_info *ptr;
method = jstr(argjson,"method"); method = jstr(argjson,"method");
if ( method != 0 && strcmp(method,"uitem") == 0 ) if ( method != 0 && (strcmp(method,"uitem") == 0 || strcmp(method,"postutxos") == 0) )
return(0); return(0);
printf("stats_JSON %s\n",method); printf("stats_JSON %s\n",method);
/*if ( (ipaddr= jstr(argjson,"ipaddr")) != 0 && (argport= juint(argjson,"port")) != 0 && (method == 0 || strcmp(method,"electrum") != 0) ) /*if ( (ipaddr= jstr(argjson,"ipaddr")) != 0 && (argport= juint(argjson,"port")) != 0 && (method == 0 || strcmp(method,"electrum") != 0) )

2
iguana/exchanges/LP_nativeDEX.c

@ -1043,7 +1043,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("error launching LP_reserved_msgs for (%s)\n",myipaddr); printf("error launching LP_reserved_msgs for (%s)\n",myipaddr);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 )
{ {
printf("error launching utxosQ_loop for (%s)\n",myipaddr); printf("error launching utxosQ_loop for (%s)\n",myipaddr);
exit(-1); exit(-1);

3
iguana/exchanges/LP_signatures.c

@ -330,6 +330,7 @@ int32_t LP_utxos_sigadd(cJSON *item,uint32_t timestamp,bits256 priv,uint8_t *pub
void LP_postutxos(char *symbol,char *coinaddr) void LP_postutxos(char *symbol,char *coinaddr)
{ {
bits256 zero; uint32_t timestamp; bits256 utxoshash; char pubsecpstr[67]; struct iguana_info *coin; cJSON *array,*reqjson = cJSON_CreateObject(); bits256 zero; uint32_t timestamp; bits256 utxoshash; char pubsecpstr[67]; struct iguana_info *coin; cJSON *array,*reqjson = cJSON_CreateObject();
return;
if ( (coin= LP_coinfind(symbol)) != 0 && (array= LP_address_utxos(coin,coinaddr,1)) != 0 ) if ( (coin= LP_coinfind(symbol)) != 0 && (array= LP_address_utxos(coin,coinaddr,1)) != 0 )
{ {
//printf("LP_postutxos pubsock.%d %s %s\n",pubsock,symbol,coin->smartaddr); //printf("LP_postutxos pubsock.%d %s %s\n",pubsock,symbol,coin->smartaddr);
@ -362,6 +363,7 @@ struct LP_utxos_qitem { struct queueitem DL; cJSON *argjson; };
char *LP_postutxos_recv(cJSON *argjson) char *LP_postutxos_recv(cJSON *argjson)
{ {
struct LP_utxos_qitem *uitem; struct iguana_info *coin; char *coinaddr,*symbol; bits256 utxoshash,pubkey; cJSON *obj; struct LP_pubkeyinfo *pubp; struct LP_utxos_qitem *uitem; struct iguana_info *coin; char *coinaddr,*symbol; bits256 utxoshash,pubkey; cJSON *obj; struct LP_pubkeyinfo *pubp;
printf("LP_postutxos_recv deprecated\n");
pubkey = jbits256(argjson,"pubkey"); pubkey = jbits256(argjson,"pubkey");
pubp = LP_pubkeyfind(pubkey); pubp = LP_pubkeyfind(pubkey);
if ( pubp != 0 && pubp->numerrors > LP_MAXPUBKEY_ERRORS ) if ( pubp != 0 && pubp->numerrors > LP_MAXPUBKEY_ERRORS )
@ -652,6 +654,7 @@ return;
char *LP_uitem_recv(cJSON *argjson) char *LP_uitem_recv(cJSON *argjson)
{ {
bits256 txid; int32_t vout,height; uint64_t value; struct iguana_info *coin; char *coinaddr,*symbol; bits256 txid; int32_t vout,height; uint64_t value; struct iguana_info *coin; char *coinaddr,*symbol;
printf("LP_uitem_recv deprecated\n");
txid = jbits256(argjson,"txid"); txid = jbits256(argjson,"txid");
vout = jint(argjson,"vout"); vout = jint(argjson,"vout");
height = jint(argjson,"ht"); height = jint(argjson,"ht");

Loading…
Cancel
Save