Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f5198cf02c
  1. 12
      iguana/iguana_bundles.c
  2. 2
      iguana/iguana_recv.c

12
iguana/iguana_bundles.c

@ -374,11 +374,11 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
bp->datasize = bp->numhashes = bp->numsaved = bp->numcached = bp->numrecv = bp->minrequests = 0;
for (bundlei=0; bundlei<bp->n; bundlei++)
{
if ( bits256_nonz(bp->hashes[bundlei]) > 0 )
if ( bits256_nonz(bp->hashes[bundlei]) > 0 && (block= bp->blocks[bundlei]) != 0 )
{
if ( (block= bp->blocks[bundlei]) != 0 || (block= iguana_blockfind(coin,bp->hashes[bundlei])) != 0 )
if ( block == iguana_blockfind(coin,bp->hashes[bundlei]) )
{
bp->blocks[bundlei] = block;
//bp->blocks[bundlei] = block;
if ( bp->minrequests == 0 || (block->numrequests > 0 && block->numrequests < bp->minrequests) )
bp->minrequests = block->numrequests;
if ( block->fpipbits != 0 )
@ -391,6 +391,12 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
bp->numcached++;
}
}
else
{
bp->blocks[bundlei] = iguana_blockfind(coin,bp->hashes[bundlei]);
if ( (block= bp->blocks[bundlei]) != 0 )
block->fpipbits = block->queued = 0;
}
bp->numhashes++;
}
}

2
iguana/iguana_recv.c

@ -139,7 +139,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i
}
}
}
copyflag = 0 * (strcmp(coin->symbol,"BTC") != 0);
copyflag = 1 * (strcmp(coin->symbol,"BTC") != 0);
req = iguana_bundlereq(coin,addr,'B',copyflag * recvlen);
req->recvlen = recvlen;
req->H = *H;

Loading…
Cancel
Save