From a23434a23b8b1c9f4fb668f5e55e7500e5b7168a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 14 Jan 2017 18:21:25 +0200 Subject: [PATCH] test --- iguana/dPoW.h | 2 +- iguana/dpow/dpow_network.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 41283f8ce..f875025d5 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -22,7 +22,7 @@ #define DPOW_MINSIGS 17 //#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1) #define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries) -#define DPOW_VERSION 0x0779 +#define DPOW_VERSION 0x0780 #define DPOW_UTXOSIZE 10000 #define DPOW_MINOUTPUT 6000 #define DPOW_DURATION 600 diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index cceeb063f..6d3986dc7 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -59,6 +59,7 @@ int32_t signed_nn_send(void *ctx,bits256 privkey,int32_t sock,void *packet,int32 } } free(sigpacket); + printf("error signing nnpacket\n"); } return(-1); } @@ -222,7 +223,7 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *data,int3 { timeout = 100; nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); - timeout = 2000; + timeout = 3000; nn_setsockopt(reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); //nn_setsockopt(reqsock,NN_TCP,NN_RECONNECT_IVL,&timeout,sizeof(timeout)); if ( myinfo->IAMNOTARY == 0 && subsock < 0 && (subsock= nn_socket(AF_SP,NN_SUB)) >= 0 ) @@ -1586,7 +1587,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) break; usleep(1000); }*/ - while ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dpowsock,&np)) >= 0 && num < 300 ) + while ( (size= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->dpowsock,&np)) >= 0 && num < 100 ) { num++; if ( size > 0 )