diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 8f0c52a00..114f1a78b 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -300,7 +300,7 @@ void dpow_statemachinestart(void *ptr) bp = calloc(1,sizeof(*bp)); blockindex = dpow_blockfind(myinfo,dp); dp->blocks[blockindex] = bp; - //printf("allocate bp for %s ht.%d -> %s\n",src->symbol,checkpoint.blockhash.height,dest->symbol); + printf("blockindex.%i allocate bp for %s ht.%d -> %s\n",src->symbol,checkpoint.blockhash.height,dest->symbol); //Numallocated++; bp->MoM = MoM; bp->MoMdepth = MoMdepth; diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 00e96644c..557700205 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -2315,7 +2315,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) dpow_ipbitsadd(myinfo,dp,np->ipbits,np->numipbits,sizeof(np->ipbits)/sizeof(*np->ipbits),np->senderind,np->myipbits); if ( (bp= dpow_heightfind(myinfo,dp,np->height)) != 0 && bp->state != 0xffffffff && bp->myind >= 0 ) { - //char str[65]; printf("%s RECV ht.%d ch.%08x (%d) crc32.%08x:%08x datalen.%d:%d firstz.%d i.%d senderind.%d myind.%d\n",bits256_str(str,np->srchash),np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np)),firstz,i,np->senderind,bp->myind); + char str[65]; printf("%s RECV ht.%d ch.%08x (%d) crc32.%08x:%08x datalen.%d:%d firstz.%d i.%d senderind.%d myind.%d\n",bits256_str(str,np->srchash),np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np)),firstz,i,np->senderind,bp->myind); if ( np->senderind >= 0 && np->senderind < bp->numnotaries ) { if ( memcmp(bp->notaries[np->senderind].pubkey+1,np->srchash.bytes,32) == 0 && bits256_nonz(np->srchash) != 0 ) diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 4aa35794a..57e36375a 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -176,8 +176,12 @@ struct dpow_block *dpow_heightfind(struct supernet_info *myinfo,struct dpow_info int32_t i; struct dpow_block *bp = 0; for (i = 0; i < dp->maxblocks; i++) { - if ( height == dp->blocks[i]->height ) - return(bp); + if ( dp->blocks[i] != 0 ) + { + fprintf(stderr, "symbol.%s height.%i dp_height.%i\n",dp->symbol, height, dp->blocks[i]->height); + if ( height == dp->blocks[i]->height ) + return(bp); + } } return(0); }