Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2d6fdb27e9
  1. 2
      iguana/iguana777.h
  2. 8
      iguana/iguana_bundles.c
  3. 2
      iguana/iguana_peers.c
  4. 6
      iguana/iguana_unspents.c

2
iguana/iguana777.h

@ -41,7 +41,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEADPERCENTAGE 0.
#define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1
#define IGUANA_MAXPENDINGREQUESTS 16
#define IGUANA_MAXPENDINGREQUESTS 7
#define IGUANA_PENDINGREQUESTS 32
#define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 64

8
iguana/iguana_bundles.c

@ -661,13 +661,13 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
return(0);
#endif
for (i=0; i<bp->hdrsi; i++)
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc || prevbp->startutxo == 0
//#ifdef IGUANA_SERIALIZE_SPENDVECTORGEN
|| (i < bp->hdrsi-16 && prevbp->utxofinish <= 1 )
|| (i < bp->hdrsi-16 && prevbp->utxofinish <= 1)
//#endif
)
break;
if ( bp->hdrsi < coin->blocks.hwmchain.height/coin->chain->bundlesize && i == bp->hdrsi )//&& coin->emitbusy <= 4 )
if ( bp->hdrsi < coin->blocks.hwmchain.height/coin->chain->bundlesize && i == bp->hdrsi && time(NULL) > bp->emitfinish+10 )//&& coin->emitbusy <= 4 )
{
if ( bp->startutxo == 0 )
{
@ -755,7 +755,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
{
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 )
{
printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
//printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
bp->queued = 0;
return(0);
} //else printf("finish incomplete.%d\n",bp->hdrsi);

2
iguana/iguana_peers.c

@ -560,7 +560,7 @@ void _iguana_processmsg(struct iguana_info *coin,int32_t usock,struct iguana_pee
printf("invalid header received from (%s)\n",addr->ipaddr);
addr->dead = 1;
}
printf("%s recv error on hdr errno.%d (%s) -> zombify\n",addr->ipaddr,-recvlen,strerror(-recvlen));
// printf("%s recv error on hdr errno.%d (%s) -> zombify\n",addr->ipaddr,-recvlen,strerror(-recvlen));
#ifndef IGUANA_DEDICATED_THREADS
addr->dead = 1;
#endif

6
iguana/iguana_unspents.c

@ -642,7 +642,7 @@ void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp)
int32_t i; struct iguana_bundle *spentbp; uint32_t starttime = (uint32_t)time(NULL);
if ( bp->hdrsi > 30 )
{
printf("start prefetch for [%d]\n",bp->hdrsi);
//printf("start prefetch for [%d]\n",bp->hdrsi);
for (i=1; i<30; i++)
{
if ( (spentbp= coin->bundles[bp->hdrsi - i]) != 0 )
@ -651,7 +651,7 @@ void iguana_prefetch(struct iguana_info *coin,struct iguana_bundle *bp)
spentbp->lastprefetch = starttime;
}
}
printf("end prefetch for [%d] elapsed %d\n",bp->hdrsi,(uint32_t)time(NULL)-starttime);
//printf("end prefetch for [%d] elapsed %d\n",bp->hdrsi,(uint32_t)time(NULL)-starttime);
}
}
@ -664,7 +664,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
bits256 prevhash,zero,sha256; struct iguana_unspent *u,*spentU; struct iguana_txid *T;
struct iguana_spend *S,*s; struct iguana_spendvector *ptr; struct iguana_ramchain *ramchain;
ramchain = &bp->ramchain;
printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data);
//printf("iguana_spendvectors.[%d] gen.%d ramchain data.%p\n",bp->hdrsi,bp->bundleheight,ramchain->H.data);
if ( (rdata= ramchain->H.data) == 0 || (n= rdata->numspends) < 1 )
return(0);
B = (void *)(long)((long)rdata + rdata->Boffset);

Loading…
Cancel
Save