|
|
@ -941,7 +941,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct |
|
|
|
|
|
|
|
struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana_peer *addr,struct iguana_bundlereq *req,struct iguana_block *origblock,int32_t numtx,int32_t datalen,int32_t recvlen,int32_t *newhwmp) |
|
|
|
{ |
|
|
|
struct iguana_bundle *bp=0,*prev; int32_t n,numsaved=0,bundlei = -2; struct iguana_block *block,*tmpblock,*next; char str[65]; bits256 hash2; |
|
|
|
struct iguana_bundle *bp=0,*prev; int32_t n,bundlei = -2; struct iguana_block *block,*next; char str[65]; bits256 hash2; |
|
|
|
if ( bits256_nonz(origblock->RO.prev_block) != 0 ) |
|
|
|
iguana_blockQ("prev",coin,0,-1,origblock->RO.prev_block,1); |
|
|
|
if ( (bp= iguana_bundleset(coin,&block,&bundlei,origblock)) != 0 && bp == coin->current && block != 0 && bp->speculative != 0 && bundlei >= 0 ) |
|
|
@ -974,13 +974,13 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana |
|
|
|
{ |
|
|
|
int32_t i; static int32_t numrecv; |
|
|
|
numrecv++; |
|
|
|
if ( bp != 0 ) |
|
|
|
/*if ( bp != 0 )
|
|
|
|
{ |
|
|
|
for (i=numsaved=0; i<bp->n; i++) |
|
|
|
if ( (tmpblock= bp->blocks[i]) != 0 && tmpblock->fpipbits != 0 && tmpblock->fpos >= 0 && ((bp->hdrsi == 0 && i == 0) || bits256_nonz(tmpblock->RO.prev_block) != 0) ) |
|
|
|
numsaved++; |
|
|
|
} |
|
|
|
fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req->copyflag); |
|
|
|
fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req->copyflag);*/ |
|
|
|
if ( _iguana_chainlink(coin,block) == 0 ) |
|
|
|
{ |
|
|
|
next = block; |
|
|
|