Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0c40de31bb
  1. 2
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_recv.c
  3. 3
      iguana/iguana_unspents.c

2
iguana/iguana_bundles.c

@ -1138,7 +1138,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
iguana_blockQ("stuck",coin,bp,i,block->RO.hash2,1);
}*/
}
if ( (n= iguana_bundleissuemissing(coin,bp,1,1.)) > 0 )
if ( (n= iguana_bundleissuemissing(coin,bp,3,1.)) > 0 )
printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag);
//else printf("no bundlerequests issued\n");
}

6
iguana/iguana_recv.c

@ -941,7 +941,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct
struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana_peer *addr,struct iguana_bundlereq *req,struct iguana_block *origblock,int32_t numtx,int32_t datalen,int32_t recvlen,int32_t *newhwmp)
{
struct iguana_bundle *bp=0,*prev; int32_t n,numsaved=0,bundlei = -2; struct iguana_block *block,*tmpblock,*next; char str[65]; bits256 hash2;
struct iguana_bundle *bp=0,*prev; int32_t n,bundlei = -2; struct iguana_block *block,*next; char str[65]; bits256 hash2;
if ( bits256_nonz(origblock->RO.prev_block) != 0 )
iguana_blockQ("prev",coin,0,-1,origblock->RO.prev_block,1);
if ( (bp= iguana_bundleset(coin,&block,&bundlei,origblock)) != 0 && bp == coin->current && block != 0 && bp->speculative != 0 && bundlei >= 0 )
@ -974,13 +974,13 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
{
int32_t i; static int32_t numrecv;
numrecv++;
if ( bp != 0 )
/*if ( bp != 0 )
{
for (i=numsaved=0; i<bp->n; i++)
if ( (tmpblock= bp->blocks[i]) != 0 && tmpblock->fpipbits != 0 && tmpblock->fpos >= 0 && ((bp->hdrsi == 0 && i == 0) || bits256_nonz(tmpblock->RO.prev_block) != 0) )
numsaved++;
}
fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req->copyflag);
fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req->copyflag);*/
if ( _iguana_chainlink(coin,block) == 0 )
{
next = block;

3
iguana/iguana_unspents.c

@ -1840,7 +1840,8 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
B = (void *)(long)((long)rdata + rdata->Boffset);
bundlei = (coin->RTheight % coin->chain->bundlesize);
block = iguana_bundleblock(coin,&hash2,bp,bundlei);
bp->blocks[bundlei] = block;
iguana_bundlehashadd(coin,bp,bundlei,block);
//bp->blocks[bundlei] = block;
//if ( bits256_nonz(hash2) != 0 )
// iguana_blockhashset("RTset",coin,bp->bundleheight+bundlei,hash2,1);
//printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data);

Loading…
Cancel
Save