From 69ad8b7f0d1b96e9beb23c4e67b39cef2d3b70c9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 4 Nov 2016 08:54:32 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 6 ++++++ iguana/dpow/dpow_network.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 619faae55..8d0d66e92 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/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 ) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index a4f128099..8024210bb 100755 --- a/iguana/dpow/dpow_network.c +++ b/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 )