Browse Source

test

etomic
jl777 8 years ago
parent
commit
a23434a23b
  1. 2
      iguana/dPoW.h
  2. 5
      iguana/dpow/dpow_network.c

2
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

5
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 )

Loading…
Cancel
Save