jl777 8 years ago
parent
commit
69ad8b7f0d
  1. 6
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_network.c

6
iguana/dpow/dpow_fsm.c

@ -554,7 +554,13 @@ void dpow_statemachinestart(void *ptr)
bp->bestmask = bp->recvmask = 0;
bp->height = ((dp->checkpoint.blockhash.height / 10) % (DPOW_FIRSTRATIFY/10)) * 10;
printf("new rotation ht.%d\n",bp->height);
dp->blocks[checkpoint.blockhash.height] = 0;
checkpoint.blockhash.height = dp->checkpoint.blockhash.height;
dp->blocks[checkpoint.blockhash.height] = bp;
for (i=0; i<64; i++)
bp->notaries[i].recvmask = 0;
memset(bp->destsigsmasks,0,sizeof(bp->destsigsmasks));
memset(bp->notaries[myind].masks,0,sizeof(bp->notaries[myind].masks));
}
}
if ( bp->state != 0xffffffff )

2
iguana/dpow/dpow_network.c

@ -125,7 +125,7 @@ void dpow_nanomsg_update(struct supernet_info *myinfo)
}
if ( dp != 0 && crc32 == np->crc32 && (firstz= dpow_crc32find(myinfo,dp,crc32,np->channel)) >= 0 )
{
char str[65]; printf("%s RECV ht.%d ch.%08x (%d) crc32.%08x:%08x datalen.%d:%d firstz.%d\n",bits256_str(str,np->srchash),np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np)),firstz);
//char str[65]; printf("%s RECV ht.%d ch.%08x (%d) crc32.%08x:%08x datalen.%d:%d firstz.%d\n",bits256_str(str,np->srchash),np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np)),firstz);
if ( i == myinfo->numdpows )
printf("received nnpacket for (%s)\n",np->symbol);
else if ( dpow_datahandler(myinfo,dp,np->channel,np->height,np->packet,np->datalen) >= 0 )

Loading…
Cancel
Save