jl777 8 years ago
parent
commit
5409fb116b
  1. 8
      iguana/dpow/dpow_network.c
  2. 4
      iguana/main.c

8
iguana/dpow/dpow_network.c

@ -103,16 +103,16 @@ void dpow_nanomsg_update(struct supernet_info *myinfo)
{
if ( size >= 0 )
{
crc32 = calc_crc32(0,np->packet,np->datalen);
if ( crc32 == np->crc32 && np->datalen == (size - sizeof(*np)) )
if ( np->datalen == (size - sizeof(*np)) )
{
if ( (firstz= dpow_crc32find(myinfo,crc32)) >= 0 )
crc32 = calc_crc32(0,np->packet,np->datalen);
if ( crc32 == np->crc32 && (firstz= dpow_crc32find(myinfo,crc32)) >= 0 )
{
myinfo->DPOW.crcs[firstz] = crc32;
printf("NANORECV ht.%d channel.%08x (%d) crc32.%08x:%08x datalen.%d:%d\n",np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np)));
dpow_datahandler(myinfo,np->channel,np->height,np->packet,size - np->size);
}
}
} else printf("np->datalen.%d (size %d - %ld)\n",np->datalen,size,sizeof(*np));
if ( np != 0 )
nn_freemsg(np);
}

4
iguana/main.c

@ -1587,8 +1587,8 @@ void iguana_main(void *arg)
libgfshare_init(myinfo,myinfo->logs,myinfo->exps);
myinfo->rpcport = IGUANA_RPCPORT;
myinfo->DPOW.sock = -1;
myinfo->rpcport = IGUANA_NOTARYPORT;
myinfo->IAMNOTARY = 1;
//myinfo->rpcport = IGUANA_NOTARYPORT;
//myinfo->IAMNOTARY = 1;
if ( arg != 0 )
{
if ( strcmp((char *)arg,"OStests") == 0 )

Loading…
Cancel
Save