Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1393743622
  1. 13
      iguana/iguana_bundles.c
  2. 2
      iguana/iguana_recv.c

13
iguana/iguana_bundles.c

@ -761,12 +761,15 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
{
struct iguana_bundle *prevbp; int32_t prevdone = 0;
if ( (prevbp= coin->bundles[bp->hdrsi-1]) != 0 && prevbp->balancefinish > 1 )
struct iguana_bundle *prevbp; int32_t i;//prevdone = 0;
/*if ( (prevbp= coin->bundles[bp->hdrsi-1]) != 0 && prevbp->balancefinish > 1 )
prevdone = 1;
else if ( coin->current != 0 && prevbp != 0 && coin->current->hdrsi >= prevbp->hdrsi && prevbp->emitfinish > 1 && time(NULL) > prevbp->emitfinish+13 )
prevdone = 1;
if ( bp->hdrsi == 0 || prevdone != 0 )
prevdone = 1;*/
for (i=0; i<bp->hdrsi; i++)
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc )
break;
if ( i == bp->hdrsi )
{
if ( bp->startutxo == 0 )
{
@ -991,7 +994,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
lastpending = bp;
//printf("SET MAXBUNDLES.%d pend.%d\n",bp->hdrsi,pending);
}
if ( firstgap == 0 )//&& (bp->emitfinish == 0 || bp->n < coin->chain->bundlesize) )
if ( firstgap == 0 && (bp->emitfinish == 0 || bp->n < coin->chain->bundlesize) )
{
//printf("firstgap <- [%d] emit.%u bp->n.%d\n",bp->hdrsi,bp->emitfinish,bp->n);
firstgap = bp;

2
iguana/iguana_recv.c

@ -1102,7 +1102,7 @@ int32_t iguana_reqhdrs(struct iguana_info *coin)
{
for (i=0; i<coin->bundlescount; i++)
{
if ( (bp= coin->bundles[i]) != 0 && (bp == coin->current || i == coin->bundlescount-1 || bp->numhashes < bp->n) )
if ( (bp= coin->bundles[i]) != 0 && (bp->hdrsi == coin->longestchain/coin->chain->bundlesize || i == coin->bundlescount-1 || bp->numhashes < bp->n) )
{
lag = 30;
if ( bp->bundleheight < coin->longestchain && time(NULL) > bp->issuetime+lag )

Loading…
Cancel
Save