jl777 7 years ago
parent
commit
4f89f224f0
  1. 1
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_network.c
  3. 2
      iguana/exchanges/LP_socket.c
  4. 6
      iguana/exchanges/LP_utxo.c

1
iguana/exchanges/LP_nativeDEX.c

@ -51,6 +51,7 @@ uint16_t LP_fixed_pairport,LP_publicport;
int32_t LP_mybussock = -1;
int32_t LP_mypubsock = -1;
int32_t LP_mypullsock = -1;
int32_t LP_mypushsock = -1;
int32_t LP_pendingswaps,LP_showwif,USERPASS_COUNTER,IAMLP = 0;
uint32_t LP_sessionid;
double LP_profitratio = 1.;

2
iguana/exchanges/LP_network.c

@ -311,7 +311,7 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25
jdelete(argjson,"method2");
jaddstr(argjson,"method2",method);
jaddstr(argjson,"method",method);
//printf("CRC32.%u (%s)\n",crc32,(char *)msg);
printf("CRC32.%u (%s)\n",crc32,(char *)msg);
LP_broadcast_finish(pubsock,base,rel,msg,argjson,0);
} // else printf("no valid method in (%s)\n",msgstr);
free_json(argjson);

2
iguana/exchanges/LP_socket.c

@ -468,7 +468,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
{
//printf("LISTUNSPENT.(%s)\n",jprint(retjson,0));
if ( electrum_process_array(coin,addr,retjson) != 0 )
LP_postutxos(LP_mypubsock,coin->symbol);
LP_postutxos(LP_mypushsock,coin->symbol);
strcpy(coin->lastunspent,addr);
coin->unspenttime = (uint32_t)time(NULL);
}

6
iguana/exchanges/LP_utxo.c

@ -180,7 +180,7 @@ cJSON *LP_address_utxos(struct iguana_info *coin,char *coinaddr,int32_t electrum
return(array);
}
void LP_postutxos(int32_t pubsock,char *symbol)
void LP_postutxos(int32_t sock,char *symbol)
{
bits256 zero; char *msg; struct iguana_info *coin; cJSON *array,*reqjson = cJSON_CreateObject();
if ( (coin= LP_coinfind(symbol)) != 0 && (array= LP_address_utxos(coin,coin->smartaddr,1)) != 0 )
@ -196,8 +196,8 @@ void LP_postutxos(int32_t pubsock,char *symbol)
jaddstr(reqjson,"coinaddr",coin->smartaddr);
jadd(reqjson,"utxos",array);
msg = jprint(reqjson,1);
printf("post (%s)\n",msg);
LP_broadcast_message(pubsock,symbol,symbol,zero,msg);
printf("post (%s) -> %d\n",msg,LP_mypubsock);
LP_broadcast_message(LP_mypubsock,symbol,symbol,zero,msg);
}
}
}

Loading…
Cancel
Save