Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
b6edfab80d
  1. 2
      iguana/iguana777.h
  2. 7
      iguana/iguana_bundles.c
  3. 2
      iguana/iguana_recv.c

2
iguana/iguana777.h

@ -249,7 +249,7 @@ struct msgcounts { uint32_t version,verack,getaddr,addr,inv,getdata,notfound,get
struct iguana_fileitem { bits256 hash2; struct iguana_txdatabits txdatabits; };
struct iguana_kvitem { UT_hash_handle hh; uint8_t keyvalue[]; } __attribute__((packed));
struct iguana_kvitem { UT_hash_handle hh; uint8_t keyvalue[]; };// __attribute__((packed));
struct iguana_iAddr
{

7
iguana/iguana_bundles.c

@ -72,10 +72,12 @@ int32_t iguana_bundlescan(struct iguana_info *coin,struct iguana_bundle *bp,bits
struct iguana_bundle *iguana_bundlefind(struct iguana_info *coin,struct iguana_bundle **bpp,int32_t *bundleip,bits256 hash2)
{
int32_t i; struct iguana_bloominds bit; struct iguana_bundle *bp = *bpp;
fprintf(stderr,"inside iguana_bundlefind bp.%p\n",bp);
bit = iguana_calcbloom(hash2);
if ( bp == 0 )
{
for (i=coin->bundlescount-1; i>=0; i--)
//for (i=coin->bundlescount-1; i>=0; i--)
for (i=0; i<coin->bundlescount; i++)
{
if ( (bp= coin->bundles[i]) != 0 )
{
@ -86,8 +88,7 @@ struct iguana_bundle *iguana_bundlefind(struct iguana_info *coin,struct iguana_b
{
//printf("bloom miss\n");
coin->bloomfalse++;
}
else return(bp);
} else return(bp);
} //else printf("no bloom\n");
}
}

2
iguana/iguana_recv.c

@ -469,12 +469,12 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl
fprintf(stderr,"bundleset block.%p vs origblock.%p\n",block,origblock);
if ( block != origblock )
iguana_blockcopy(coin,block,origblock);
fprintf(stderr,"copy %p\n",blockp);
*blockp = block;
prevhash2 = origblock->RO.prev_block;
fprintf(stderr,"set prevhash2\n");
if ( 0 && bits256_nonz(prevhash2) > 0 )
iguana_patch(coin,block);
fprintf(stderr,"iguana_bundlefind \n");
if ( (bp= iguana_bundlefind(coin,&bp,&bundlei,hash2)) != 0 && bundlei < coin->chain->bundlesize )
{
fprintf(stderr,"bundle found %d:%d\n",bp->hdrsi,bundlei);

Loading…
Cancel
Save