Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
285be831d4
  1. 2
      iguana/iguana_ramchain.c
  2. 2
      iguana/iguana_recv.c
  3. 4
      iguana/iguana_unspents.c

2
iguana/iguana_ramchain.c

@ -1707,7 +1707,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru
origtxdata->block.RO.recvlen = 0;
origtxdata->block.issued = 0;
return(-1);
} //else printf("matched merkle.%d\n",txn_count);
} else printf("matched merkle.%d\n",txn_count);
} else printf("not enough memory for merkle verify %ld vs %lu\n",sizeof(bits256)*(txn_count+1),(long)addr->TXDATA.totalsize);
if ( iguana_bundlefind(coin,&bp,&bundlei,origtxdata->block.RO.hash2) == 0 )
{

2
iguana/iguana_recv.c

@ -247,7 +247,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i
addr->lastblockrecv = (uint32_t)time(NULL);
addr->recvblocks += 1.;
addr->recvtotal += recvlen;
if ( iguana_ramchain_data(coin,addr,origtxdata,txarray,origtxdata->block.RO.txn_count,data,recvlen) >= 0 )
if ( iguana_ramchain_data(coin,addr,origtxdata,txarray,origtxdata->block.RO.txn_count,data,recvlen) > 0 )
{
txdata->block.fpipbits = (uint32_t)addr->ipbits;
txdata->block.RO.recvlen = recvlen;

4
iguana/iguana_unspents.c

@ -188,7 +188,7 @@ uint32_t iguana_sparseadd(uint8_t *bits,uint32_t ind,int32_t width,uint32_t tabl
ramchain->sparsesearches++;
if ( (ramchain->sparsesearches % 10000000) == 0 )
printf("%7d.[%-2d %8d] %5.3f sparse searches.%-10ld iters.%-10ld hits.%-10ld %5.2f%% max.%ld\n",ramchain->height,width,tablesize,(double)ramchain->sparseiters/(1+ramchain->sparsesearches),ramchain->sparsesearches,ramchain->sparseiters,ramchain->sparsehits,100.*(double)ramchain->sparsehits/(1+ramchain->sparsesearches),ramchain->sparsemax+1);
if ( width == 32 )
if ( 0 && width == 32 )
{
table = (uint32_t *)bits;
for (i=0; i<tablesize; i++,ind++)
@ -201,7 +201,7 @@ uint32_t iguana_sparseadd(uint8_t *bits,uint32_t ind,int32_t width,uint32_t tabl
ramchain->sparsemax = i;
ramchain->sparseiters += i;
fprintf(stderr,"set table[%d] of %d <- setind.%u\n",ind,tablesize,setind);
//table[ind] = setind;
table[ind] = setind;
return(setind);
}
else if ( memcmp((void *)(long)((long)refdata + x*refsize),key,keylen) == 0 )

Loading…
Cancel
Save