From 33f85c2c28ac7fe7801bb5549e1577dc970a2089 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 18 Oct 2017 17:15:37 +0300 Subject: [PATCH] Test --- iguana/dpow/dpow_network.c | 6 +++--- iguana/iguana777.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index c3e8ed36b..ac2f99918 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -2168,13 +2168,13 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) //printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); if ( (retstr= dex_response(&broadcastflag,myinfo,dexp)) != 0 ) { - signed_nn_send(myinfo,myinfo->ctx[1],myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1); + signed_nn_send(myinfo,myinfo->ctx[3],myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1); //printf("send back[%ld]\n",strlen(retstr)+1); free(retstr); if ( broadcastflag != 0 ) { printf("BROADCAST dexp request.[%d]\n",size); - signed_nn_send(myinfo,myinfo->ctx[1],myinfo->persistent_priv,myinfo->dexsock,dexp,size); + signed_nn_send(myinfo,myinfo->ctx[4],myinfo->persistent_priv,myinfo->dexsock,dexp,size); //signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->pubsock,dexp,size); } } @@ -2183,7 +2183,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) if ( (m= myinfo->numdpowipbits) > 0 ) { r = myinfo->dpowipbits[rand() % m]; - signed_nn_send(myinfo,myinfo->ctx[1],myinfo->persistent_priv,myinfo->repsock,&r,sizeof(r)); + signed_nn_send(myinfo,myinfo->ctx[5],myinfo->persistent_priv,myinfo->repsock,&r,sizeof(r)); printf("REP.%08x <- rand ip m.%d %x\n",dexp->crc32,m,r); } else printf("illegal state without dpowipbits?\n"); if ( dex_packetcheck(myinfo,dexp,size) == 0 ) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 62539d3d0..444565658 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -150,7 +150,7 @@ struct supernet_info struct queueitem *DEX_quotes; cJSON *Cunspents,*Cspends; struct basilisk_swap *swaps[256]; int32_t numswaps; struct basilisk_message *messagetable; portable_mutex_t messagemutex; queue_t msgQ,p2pQ; - void *ctx[4]; + void *ctx[8]; uint8_t *pingbuf; struct basilisk_request DEXaccept; FILE *dexfp;