Browse Source

rest

release/v0.1
jl777 9 years ago
parent
commit
5f603edae8
  1. 6
      iguana/iguana_bundles.c
  2. 9
      iguana/iguana_ramchain.c
  3. 6
      iguana/iguana_recv.c
  4. BIN
      iguana/pnacl/Release/iguana.pexe

6
iguana/iguana_bundles.c

@ -647,7 +647,7 @@ int32_t iguana_bundleready(struct iguana_info *coin,struct iguana_bundle *bp,int
int32_t iguana_bundlehdr(struct iguana_info *coin,struct iguana_bundle *bp,int32_t starti)
{
int32_t dist,counter=0; char str[64];
int32_t i,dist,counter=0; char str[64];
if ( 0 && bp->isRT == 0 && (bp->hdrsi == coin->bundlescount-1 || bp == coin->current) )
printf("hdr ITERATE.%d bundle.%d vs %d: h.%d n.%d r.%d s.%d c.%d finished.%d spec.%p[%d]\n",bp->hdrsi,bp->bundleheight,coin->longestchain-coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->numcached,bp->emitfinish,bp->speculative,bp->numspec);
dist = 30 + (coin->current != 0 ? bp->hdrsi - coin->current->hdrsi : 0);
@ -663,7 +663,9 @@ int32_t iguana_bundlehdr(struct iguana_info *coin,struct iguana_bundle *bp,int32
if ( bp->numhashes < bp->n && bp->numcached < bp->n )
{
//printf("issue current hdr.[%d]\n",bp->hdrsi);
bp->issued[1] = 0;
for (i=0; i<bp->n; i++)
if ( GETBIT(bp->haveblock,i) == 0 )
bp->issued[i] = 0;
//queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1);
}
iguana_bundleissuemissing(coin,bp,3,1.);

9
iguana/iguana_ramchain.c

@ -1908,10 +1908,15 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru
if ( fpos >= 0 )
block->fpos = fpos, block->fpipbits = addr_ipbits;
}
} else printf("ramchain verification error.%d hdrsi.%d bundlei.%d\n",err,bp->hdrsi,bundlei);
}
else
{
printf("ramchain verification error.%d hdrsi.%d bundlei.%d\n",err,bp->hdrsi,bundlei);
fpos = -1;
}
}
if ( fpos < 0 )
block->fpos = -1, block->fpipbits = block->RO.recvlen = 0;
iguana_blockunmark(coin,block,bp,bundlei,1);
//fprintf(stderr,"finished with hdrsi.%d ht.%d scripts.%u:%u\n",bp->hdrsi,bp->bundleheight,ramchain->H.scriptoffset,ramchain->H.data->scriptspace);
ramchain->H.ROflag = 0;
iguana_ramchain_free(coin,ramchain,0);

6
iguana/iguana_recv.c

@ -856,7 +856,13 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct
{
//printf("FOUND speculative.%s BLOCKHASHES[%d] ht.%d\n",bits256_str(str,blockhashes[1]),num,bp->bundleheight);
if ( bp->speculative == 0 )
{
bp->speculative = mycalloc('s',bp->n+1,sizeof(*bp->speculative));
for (i=0; i<bp->n; i++)
if ( GETBIT(bp->haveblock,i) == 0 )
bp->issued[i] = 0;
iguana_bundleissuemissing(coin,bp,3,1.);
}
for (i=1; i<num&&i<=bp->n; i++)
{
bp->speculative[i] = blockhashes[i];

BIN
iguana/pnacl/Release/iguana.pexe

Binary file not shown.
Loading…
Cancel
Save