diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index dc3067eb1..4778c7b60 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1292,8 +1292,8 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu { timeout = 100; nn_setsockopt(LP_mypubsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); - timeout = 10; - nn_setsockopt(LP_mypubsock,NN_SOL_SOCKET,NN_MAXTTL,&timeout,sizeof(timeout)); + //timeout = 10; + //nn_setsockopt(LP_mypubsock,NN_SOL_SOCKET,NN_MAXTTL,&timeout,sizeof(timeout)); } else { diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 5c06facc5..3c033b3c8 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -657,10 +657,10 @@ char *_LP_psock_create(int32_t *pullsockp,int32_t *pubsockp,char *ipaddr,uint16_ nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_RCVTIMEO,&arg,sizeof(arg)); if ( pubsock >= 0 ) nn_setsockopt(pubsock,NN_SOL_SOCKET,NN_RCVTIMEO,&arg,sizeof(arg)); - arg = 2; - nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_MAXTTL,&arg,sizeof(arg)); - if ( pubsock >= 0 ) - nn_setsockopt(pubsock,NN_SOL_SOCKET,NN_MAXTTL,&arg,sizeof(arg)); + //arg = 2; + //nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_MAXTTL,&arg,sizeof(arg)); + //if ( pubsock >= 0 ) + // nn_setsockopt(pubsock,NN_SOL_SOCKET,NN_MAXTTL,&arg,sizeof(arg)); nanomsg_transportname(0,pushaddr,ipaddr,publicport); nanomsg_transportname(0,subaddr,ipaddr,subport); LP_psockadd(ispaired,pullsock,publicport,pubsock,subport,subaddr,pushaddr,cmdchannel); @@ -696,7 +696,7 @@ char *_LP_psock_create(int32_t *pullsockp,int32_t *pubsockp,char *ipaddr,uint16_ *pullsockp = pullsock; *pubsockp = pubsock; return(jprint(retjson,1)); - } else printf("bind error on %s or %s\n",pushaddr,subaddr); + } //else printf("bind error on %s or %s\n",pushaddr,subaddr); if ( pullsock >= 0 ) nn_close(pullsock); if ( pubsock >= 0 ) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 1bb578a21..3db5769e0 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1013,7 +1013,7 @@ void LP_tradesloop(void *ctx) now = (uint32_t)time(NULL); Q = qtp->Q; funcid = qtp->funcid; -printf("dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp->aliceid,qtp->iambob); +//printf("dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp->aliceid,qtp->iambob); portable_mutex_lock(&LP_tradesmutex); DL_DELETE(LP_tradesQ,qtp); HASH_FIND(hh,LP_trades,&qtp->aliceid,sizeof(qtp->aliceid),tp); @@ -1041,7 +1041,7 @@ printf("dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp { flag = 1; tp->negotiationdone = now; - printf("bob sets negotiationdone.%u\n",now); + //printf("bob sets negotiationdone.%u\n",now); LP_trades_gotconnect(ctx,&tp->Q,&tp->Qs[LP_CONNECT],tp->pairstr); } } @@ -1054,10 +1054,7 @@ printf("dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp //printf("finished dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp->aliceid,qtp->iambob); free(qtp); if ( tp->negotiationdone != 0 ) - { - printf("iambob.%d negotiationdone.%u\n",tp->iambob,tp->negotiationdone); continue; - } flag = 0; if ( qtp->iambob == tp->iambob ) { @@ -1081,7 +1078,7 @@ printf("dequeue %p funcid.%d aliceid.%llu iambob.%d\n",qtp,funcid,(long long)qtp { flag = 1; tp->negotiationdone = now; - printf("bob sets negotiationdone.%u\n",now); + //printf("bob sets negotiationdone.%u\n",now); LP_trades_gotconnect(ctx,&tp->Q,&tp->Qs[LP_CONNECT],tp->pairstr); } } diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index 95c8b6821..cb0d2150d 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -167,8 +167,8 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char // valid++; if ( valid > 0 ) { - timeout = 10; - nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_MAXTTL,&timeout,sizeof(timeout)); + //timeout = 10; + //nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_MAXTTL,&timeout,sizeof(timeout)); timeout = 100; nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); printf("connected to push.(%s) pushsock.%d valid.%d | ",pushaddr,pushsock,valid);