Browse Source

Test

etomic
jl777 8 years ago
parent
commit
16d968f212
  1. 10
      iguana/exchanges/LP_unspents.c

10
iguana/exchanges/LP_unspents.c

@ -229,6 +229,11 @@ uint64_t LP_privkey_init(char *coin,uint8_t addrtype,char *passphrase,char *wifs
void LPinit(uint16_t port,double profitmargin) void LPinit(uint16_t port,double profitmargin)
{ {
char *retstr,*ipaddr; long filesize,n; int32_t i; char *retstr,*ipaddr; long filesize,n; int32_t i;
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&port) != 0 )
{
printf("error launching stats rpcloop for port.%u\n",port);
exit(-1);
}
if ( system("curl -s4 checkip.amazonaws.com > /tmp/myipaddr") == 0 ) if ( system("curl -s4 checkip.amazonaws.com > /tmp/myipaddr") == 0 )
{ {
if ( (ipaddr= OS_filestr(&filesize,"/tmp/myipaddr")) != 0 && ipaddr[0] != 0 ) if ( (ipaddr= OS_filestr(&filesize,"/tmp/myipaddr")) != 0 && ipaddr[0] != 0 )
@ -251,11 +256,6 @@ void LPinit(uint16_t port,double profitmargin)
} }
} }
LP_privkey_init("KMD",60,"test",""); LP_privkey_init("KMD",60,"test","");
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&port) != 0 )
{
printf("error launching stats rpcloop for port.%u\n",port);
exit(-1);
}
printf("peers.(%s)\n",LP_peers()); printf("peers.(%s)\n",LP_peers());
while ( 1 ) while ( 1 )
{ {

Loading…
Cancel
Save