|
|
@ -254,10 +254,6 @@ int32_t iguana_peerfname(struct iguana_info *coin,int32_t *hdrsip,char *dirname, |
|
|
|
// printf("illegal ipbits.%d\n",ipbits), getchar();
|
|
|
|
if ( (bp= iguana_bundlefind(coin,&bp,&bundlei,hash2)) == 0 ) |
|
|
|
{ |
|
|
|
int32_t i; |
|
|
|
if ( (bp= coin->bundles[0]) != 0 && bp->speculative != 0 ) |
|
|
|
for (i=0; i<100; i++) |
|
|
|
printf("(%d %d %d).%d ",bits256_nonz(bp->hashes[i]),bits256_nonz(bp->speculative[i]),bits256_cmp(bp->hashes[i],bp->speculative[i]),bits256_cmp(hash2,bp->hashes[i])); |
|
|
|
if ( bits256_nonz(prevhash2) == 0 || (bp= iguana_bundlefind(coin,&bp,&bundlei,prevhash2)) == 0 || bundlei >= coin->chain->bundlesize-1 ) |
|
|
|
{ |
|
|
|
printf("iguana_peerfname error finding.(%s) spec.%p bp.%p\n",bits256_str(str,hash2),bp!=0?bp->speculative:0,bp); |
|
|
@ -269,7 +265,7 @@ int32_t iguana_peerfname(struct iguana_info *coin,int32_t *hdrsip,char *dirname, |
|
|
|
if ( numblocks == 1 ) |
|
|
|
{ |
|
|
|
if ( bits256_nonz(bp->hashes[bundlei]) != 0 ) |
|
|
|
sprintf(fname,"%s/%s/%d/%s_%u.%d",dirname,coin->symbol,bp->bundleheight,bits256_str(str,bp->hashes[bundlei]),ipbits!=0?ipbits:*hdrsip,bundlei); |
|
|
|
sprintf(fname,"%s/%s/%d/%s_%u.%d",dirname,coin->symbol,bp->bundleheight,bits256_str(str,bp->hashes[bundlei]),ipbits>1?ipbits:*hdrsip,bundlei); |
|
|
|
else |
|
|
|
{ |
|
|
|
printf("no hash for [%d:%d]\n",bp->hdrsi,bundlei); |
|
|
@ -277,7 +273,7 @@ int32_t iguana_peerfname(struct iguana_info *coin,int32_t *hdrsip,char *dirname, |
|
|
|
} |
|
|
|
} |
|
|
|
else if ( strcmp("DB",dirname) == 0 ) |
|
|
|
sprintf(fname,"%s/%s/%s_%d.%u",dirname,coin->symbol,bits256_str(str,hash2),numblocks,ipbits!=0?ipbits:*hdrsip); |
|
|
|
sprintf(fname,"%s/%s/%s_%d.%u",dirname,coin->symbol,bits256_str(str,hash2),numblocks,ipbits>1?ipbits:*hdrsip); |
|
|
|
else sprintf(fname,"%s/%s.%u",dirname,bits256_str(str,hash2),bp->bundleheight); |
|
|
|
OS_compatible_path(fname); |
|
|
|
return(bundlei); |
|
|
|