|
|
@ -70,7 +70,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr, |
|
|
|
checkbp = 0, j = -2; |
|
|
|
if ( (checkbp= iguana_bundlefind(coin,&checkbp,&j,hash2)) != 0 && j >= 0 && j < checkbp->n ) |
|
|
|
{ |
|
|
|
if ( checkbp->emitfinish != 0 || ((block= checkbp->blocks[j]) != 0 && block->txvalid != 0) ) |
|
|
|
if ( checkbp->emitfinish != 0 || (block= checkbp->blocks[j]) != 0 )//&& block->txvalid != 0) )
|
|
|
|
{ |
|
|
|
//printf("found valid [%d:%d] in blockreqPT\n",checkbp->hdrsi,j);
|
|
|
|
return(0); |
|
|
@ -78,10 +78,13 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr, |
|
|
|
} |
|
|
|
if ( 1 && coin->enableCACHE != 0 && iguana_speculativesearch(coin,&block,hash2) != 0 ) |
|
|
|
{ |
|
|
|
//printf("found valid [%d:%d] in blockreqPT\n",block!=0?block->hdrsi:-1,block!=0?block->bundlei:-1);
|
|
|
|
return(0); |
|
|
|
if ( block != 0 && block->hdrsi != 0 && block->bundlei != 0 ) |
|
|
|
{ |
|
|
|
printf("found valid [%d:%d] in blockreqPT txvalid.%d\n",block!=0?block->hdrsi:-1,block!=0?block->bundlei:-1,block->txvalid); |
|
|
|
if ( block->txvalid != 0 ) |
|
|
|
return(0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ( addr->msgcounts.verack == 0 ) |
|
|
|
{ |
|
|
|
//printf("iguana_sendblockreq (%s) addrind.%d hasn't verack'ed yet\n",addr->ipaddr,addr->addrind);
|
|
|
@ -209,7 +212,7 @@ int32_t iguana_speculativefind(struct iguana_info *coin,struct iguana_bundle *bp |
|
|
|
{ |
|
|
|
if ( memcmp(&recvlen,tmp,sizeof(recvlen)) != 0 || memcmp(&tmp[sizeof(recvlen)],data,recvlen) != 0 ) |
|
|
|
printf("ERROR "); |
|
|
|
if ( bp == coin->current ) |
|
|
|
if ( 0 && bp == coin->current ) |
|
|
|
printf("[%d:%d] already has recvlen.%d for %s\n",bp->hdrsi,i,recvlen,bits256_str(str,block->RO.hash2)); |
|
|
|
return(0); |
|
|
|
} |
|
|
|