Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
19f0cb0c37
  1. 7
      iguana/iguana_recv.c

7
iguana/iguana_recv.c

@ -53,7 +53,8 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
coin->numreqsent++; coin->numreqsent++;
addr->pendblocks++; addr->pendblocks++;
addr->pendtime = (uint32_t)time(NULL); addr->pendtime = (uint32_t)time(NULL);
//printf("REQ.%s bundlei.%d hdrsi.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1); if ( coin->current == bp )
printf("REQ.%s bundlei.%d hdrsi.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1);
} else printf("MSG_BLOCK null datalen.%d\n",len); } else printf("MSG_BLOCK null datalen.%d\n",len);
return(len); return(len);
} }
@ -869,7 +870,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
iguana_bloomset(coin,&bp->bloom,0,bit); iguana_bloomset(coin,&bp->bloom,0,bit);
}*/ }*/
char str[65]; char str[65];
if ( 0 && bundlei >= 0 ) if ( bp == coin->current )
fprintf(stderr,"blockRECV.%d %s [%d:%d] block.%08x | h.%d\n",req->numtx,bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,bp!=0?bp->numhashes:-1); fprintf(stderr,"blockRECV.%d %s [%d:%d] block.%08x | h.%d\n",req->numtx,bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,bp!=0?bp->numhashes:-1);
if ( bundlei == 1 && bp != 0 && bp->numhashes < bp->n ) if ( bundlei == 1 && bp != 0 && bp->numhashes < bp->n )
{ {
@ -1176,7 +1177,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
} }
if ( bp == 0 || z != 0 ) if ( bp == 0 || z != 0 )
{ {
//printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0); printf("%s request HDR.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp!=0?bp->numhashes:0);
iguana_send(coin,addr,serialized,datalen); iguana_send(coin,addr,serialized,datalen);
addr->pendhdrs++; addr->pendhdrs++;
flag++; flag++;

Loading…
Cancel
Save