diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index a306dde6b..69944e7b4 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -26,7 +26,11 @@ #define sleep(x) emscripten_sleep((x) * 1000) void emscripten_usleep(int32_t x); #define usleep(x) emscripten_usleep(x) - +// ./autogen.sh +// emconfigure ./configure CFLAGS="-s PTHREAD_POOL_SIZE=8 -s USE_PTHREADS=1" +// Edit src/core/sock.c and add here #include for INT_MAX support +// emmake make +// cp .libs/libnanomsg.a ~/SuperNET/OSlibs/js #endif //#define LP_STRICTPEERS diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index fc1cda7d0..0952f5679 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -481,7 +481,6 @@ void LP_coinsloop(void *_coins) struct LP_address *ap=0,*atmp; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins; while ( 1 ) { - printf("coinsloop\n"); nonz = 0; HASH_ITER(hh,LP_coins,coin,ctmp) // firstrefht,firstscanht,lastscanht { @@ -715,7 +714,7 @@ void LP_pubkeysloop(void *ctx) while ( 1 ) { LP_counter += 100; - printf("LP_pubkeysloop %d\n",LP_counter); + //printf("LP_pubkeysloop %d\n",LP_counter); LP_notify_pubkeys(ctx,LP_mypubsock); sleep(60); } @@ -727,7 +726,7 @@ void LP_privkeysloop(void *ctx) while ( 1 ) { LP_counter += 1000; - printf("LP_privkeysloop %u\n",LP_counter); + //printf("LP_privkeysloop %u\n",LP_counter); LP_privkey_updates(ctx,LP_mypubsock,0); sleep(60); } @@ -740,7 +739,7 @@ void LP_swapsloop(void *ignore) while ( 1 ) { LP_counter += 10000; - printf("LP_swapsloop %u\n",LP_counter); + //printf("LP_swapsloop %u\n",LP_counter); if ( (retstr= basilisk_swapentry(0,0)) != 0 ) free(retstr); sleep(600); @@ -994,7 +993,6 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu } #ifndef FROM_JS int32_t nonz; - printf("start mainloop\n"); while ( 1 ) { nonz = 0; diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index a7ffdf846..1da51a464 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -83,6 +83,7 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char else peer->sessionid = sessionid; peer->pushsock = peer->subsock = pushsock = subsock = -1; strcpy(peer->ipaddr,ipaddr); +#ifndef FROM_JS if ( pushport != 0 && subport != 0 && (pushsock= nn_socket(AF_SP,NN_PUSH)) >= 0 ) { nanomsg_transportname(0,pushaddr,peer->ipaddr,pushport); @@ -114,6 +115,7 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char printf("error connecting to push.(%s)\n",pushaddr); } } else printf("%s pushport.%u subport.%u pushsock.%d\n",ipaddr,pushport,subport,pushsock); +#endif //peer->profitmargin = profitmargin; peer->ipbits = ipbits; peer->port = port;