|
|
@ -209,7 +209,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 "); |
|
|
|
printf("[%d:%d] already has recvlen.%d for %s\n",bp->hdrsi,i,recvlen,bits256_str(str,block->RO.hash2)); |
|
|
|
//printf("[%d:%d] already has recvlen.%d for %s\n",bp->hdrsi,i,recvlen,bits256_str(str,block->RO.hash2));
|
|
|
|
return(0); |
|
|
|
} |
|
|
|
bp->speculativecache[i] = mycalloc('p',1,recvlen + sizeof(recvlen)); |
|
|
@ -312,7 +312,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i |
|
|
|
uint64_t sum2 = 0,sum = 0; |
|
|
|
for (i=0; i<sizeof(received)/sizeof(*received); i++) |
|
|
|
sum += received[i], sum2 += count[i]; |
|
|
|
char str[65],str2[65],str3[65]; printf("TOTAL BLOCKS.%llu RECEIVED %s ave %.1f | duplicates.%d %s afteremit.%d %s\n",(long long)sum2,mbstr(str,sum),(double)sum/(sum2!=0?sum2:1),numDuplicates,mbstr(str2,sizeDuplicates),numAfteremit,mbstr(str3,sizeAfteremit)); |
|
|
|
//char str[65],str2[65],str3[65]; printf("TOTAL BLOCKS.%llu RECEIVED %s ave %.1f | duplicates.%d %s afteremit.%d %s\n",(long long)sum2,mbstr(str,sum),(double)sum/(sum2!=0?sum2:1),numDuplicates,mbstr(str2,sizeDuplicates),numAfteremit,mbstr(str3,sizeAfteremit));
|
|
|
|
} |
|
|
|
} |
|
|
|
copyflag = 0;//(coin->enableCACHE != 0) && (strcmp(coin->symbol,"BTC") != 0);
|
|
|
@ -326,7 +326,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i |
|
|
|
sizeAfteremit += recvlen; |
|
|
|
if ( (block= bp->blocks[bundlei]) != 0 ) |
|
|
|
iguana_bundletime(coin,bp,bundlei,block,1); |
|
|
|
printf("got [%d:%d] with emitfinish.%u\n",bp->hdrsi,bundlei,bp->emitfinish); |
|
|
|
//printf("got [%d:%d] with emitfinish.%u\n",bp->hdrsi,bundlei,bp->emitfinish);
|
|
|
|
return; |
|
|
|
} |
|
|
|
bp->dirty++; |
|
|
@ -337,7 +337,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i |
|
|
|
numDuplicates++; |
|
|
|
sizeDuplicates += recvlen; |
|
|
|
iguana_bundletime(coin,bp,bundlei,block,1); |
|
|
|
printf("duplicate [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2)); |
|
|
|
//printf("duplicate [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2));
|
|
|
|
if ( bits256_cmp(origtxdata->block.RO.hash2,block->RO.hash2) == 0 ) |
|
|
|
return; |
|
|
|
else printf("mismatched tx received? mainchain.%d\n",block->mainchain); |
|
|
|