jl777 8 years ago
parent
commit
3e556c167e
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 4
      iguana/dpow/dpow_network.c

2
iguana/dpow/dpow_fsm.c

@ -128,7 +128,7 @@ void dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t hei
printf("handle channel.%x\n",channel);
if ( (bp= dpow_heightfind(myinfo,height,channel == DPOW_BTCTXIDCHANNEL)) != 0 )
{
printf("bp.%p datalen.%d\n",bp,datalen);
//printf("bp.%p datalen.%d\n",bp,datalen);
for (i=0; i<32; i++)
srchash.bytes[i] = data[i];
/*if ( srchash.ulongs[0] == 0 )

4
iguana/dpow/dpow_network.c

@ -58,6 +58,7 @@ void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr)
int32_t dpow_crc32find(struct supernet_info *myinfo,uint32_t crc32,uint32_t channel)
{
int32_t i,firstz = -1;
return(0);
//if ( channel != DPOW_UTXOBTCCHANNEL && channel != DPOW_UTXOCHANNEL )
{
for (i=0; i<sizeof(myinfo->DPOW.crcs)/sizeof(*myinfo->DPOW.crcs); i++)
@ -85,7 +86,7 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_block *bp,bits256 srchas
myinfo->DPOW.crcs[firstz] = crc32;
size = (int32_t)(sizeof(*np) + datalen);
np = calloc(1,size);
printf("dpow_send.(%d) size.%d\n",datalen,size);
//printf("dpow_send.(%d) size.%d\n",datalen,size);
np->size = size;
np->datalen = datalen;
np->crc32 = crc32;
@ -115,7 +116,6 @@ void dpow_nanomsg_update(struct supernet_info *myinfo)
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,np->datalen);
printf("returned from datahandler\n");
}
} else printf("np->datalen.%d (size %d - %ld)\n",np->datalen,size,sizeof(*np));
if ( np != 0 )

Loading…
Cancel
Save