jl777 8 years ago
parent
commit
a1a230c698
  1. 8
      iguana/iguana777.c
  2. 6
      iguana/iguana_bundles.c
  3. 2
      iguana/iguana_recv.c
  4. 8
      iguana/iguana_spendvectors.c
  5. 2
      includes/iguana_defines.h

8
iguana/iguana777.c

@ -326,12 +326,16 @@ int32_t iguana_emitfinished(struct supernet_info *myinfo,struct iguana_info *coi
{
if ( (bp= coin->bundles[i]) != 0 )
{
if ( bp->emitfinish == 0 && bp->ramchain.H.data != 0 )
bp->emitfinish = (uint32_t)time(NULL);
if ( bp->emitfinish > 1 )
n++;
//printf("%u ",bp->emitfinish);
//else if ( bp->emitfinish == 0 && bp->queued == 0 )
// iguana_bundleQ(myinfo,coin,bp,1000);
}
}
//printf("emitfinished.%d\n",n);
return(n);
}
@ -726,9 +730,9 @@ void iguana_helper(void *arg)
}
}
}
if ( helperid == 0 )
iguana_coin_mainiter(myinfo,coin,&numpeers,&MEM,MEMB);
}
if ( helperid == 0 )
iguana_coin_mainiter(myinfo,coin,&numpeers,&MEM,MEMB);
}
//portable_mutex_unlock(&myinfo->allcoins_mutex);
n = queue_size(&bundlesQ);

6
iguana/iguana_bundles.c

@ -1364,12 +1364,14 @@ void iguana_bundlestats(struct supernet_info *myinfo,struct iguana_info *coin,ch
numcached += bp->numcached;
numrecv += bp->numrecv;
numsaved += bp->numsaved;
if ( bp->emitfinish > 1 )
if ( bp->utxofinish > 1 )
numutxo++;
if ( bp->balancefinish > 1 )
numbalances++;
if ( bp->validated > 1 )
numv++;
if ( bp->emitfinish == 0 && bp->ramchain.H.data != 0 )
bp->emitfinish = (uint32_t)time(NULL);
if ( bp->emitfinish >= 1 )
{
if ( bp->emitfinish == 1 )
@ -1517,7 +1519,7 @@ void iguana_bundlestats(struct supernet_info *myinfo,struct iguana_info *coin,ch
{
//printf("bundleQ.[%d]\n",j);
bp->balancefinish = bp->startutxo = 0;
bp->emitfinish = 1;
bp->utxofinish = 1;
iguana_bundleQ(myinfo,coin,bp,1000);
}
}

2
iguana/iguana_recv.c

@ -2039,7 +2039,7 @@ int32_t iguana_blockQ(char *argstr,struct iguana_info *coin,struct iguana_bundle
//getchar();
return(-1);
}
if ( 1 && coin->enableCACHE != 0 && iguana_speculativesearch(coin,&block,hash2) != 0 && block != 0 && block->txvalid != 0 )
if ( 0 && coin->enableCACHE != 0 && iguana_speculativesearch(coin,&block,hash2) != 0 && block != 0 && block->txvalid != 0 )
{
//printf("found valid [%d:%d] in blockQ\n",block!=0?block->hdrsi:-1,block!=0?block->bundlei:-1);
return(0);

8
iguana/iguana_spendvectors.c

@ -261,7 +261,7 @@ int32_t iguana_spendvectors(struct supernet_info *myinfo,struct iguana_info *coi
{
bp->tmpspends = ramchain->Xspendinds;
bp->numtmpspends = ramchain->numXspends;
bp->emitfinish = (uint32_t)time(NULL);
bp->utxofinish = (uint32_t)time(NULL);
bp->balancefinish = 0;
//printf("iguana_spendvectors.[%d]: already have Xspendinds[%d]\n",bp->hdrsi,ramchain->numXspends);
return(0);
@ -622,7 +622,7 @@ int32_t iguana_volatilesinit(struct supernet_info *myinfo,struct iguana_info *co
{
if ( (bp= coin->bundles[i]) == 0 )
continue;
if ( bp->emitfinish <= 1 || (i > 0 && bp->utxofinish <= 1) )
if ( bp->utxofinish <= 1 || (i > 0 && bp->utxofinish <= 1) )
{
//printf("hdrsi.[%d] emitfinish.%u utxofinish.%u\n",i,bp->emitfinish,bp->utxofinish);
continue;
@ -751,7 +751,7 @@ void iguana_initfinal(struct supernet_info *myinfo,struct iguana_info *coin,bits
}
for (i=0; i<coin->bundlescount-1; i++)
{
if ( (bp= coin->bundles[i]) == 0 || bp->emitfinish <= 1 )
if ( (bp= coin->bundles[i]) == 0 || bp->utxofinish <= 1 )
{
printf("%s initfinal break.[%d]: bp.%p or emit.%u utxofinish.%u\n",coin->symbol,i,bp,bp!=0?bp->emitfinish:-1,bp!=0?bp->utxofinish:-1);
break;
@ -1160,7 +1160,7 @@ int32_t iguana_bundlevalidate(struct supernet_info *myinfo,struct iguana_info *c
printf("%s %s VALIDATED.[%d] ht.%d duration.%d errs.%d total.%lld %u | total errs.%d validated.%d %llx\n",coin->symbol,errs!=0?"NOT":"",bp->hdrsi,bp->bundleheight,(uint32_t)time(NULL) - now,errs,(long long)total,bp->validated,totalerrs,totalvalidated,(long long)validatehash.txid);
if ( errs == 0 )
bp->validated = (uint32_t)time(NULL);
else bp->startutxo = bp->utxofinish = 0;
else bp->validated = bp->startutxo = bp->utxofinish = 0;
//iguana_volatilesmap(coin,&bp->ramchain);
//if ( bp == coin->current )
// coin->RTdatabad = -1;

2
includes/iguana_defines.h

@ -25,7 +25,7 @@
#ifdef __PNACL__
#define IGUANA_MAXITERATIONS 77
#else
#define IGUANA_MAXITERATIONS 77
#define IGUANA_MAXITERATIONS 777
#endif
#define IGUANA_DEFAULTLAG 7

Loading…
Cancel
Save