jl777 8 years ago
parent
commit
a47461916f
  1. 10
      iguana/iguana777.c
  2. 2
      iguana/iguana_bundles.c
  3. 3
      iguana/iguana_spendvectors.c

10
iguana/iguana777.c

@ -661,7 +661,7 @@ int32_t iguana_coin_mainiter(struct supernet_info *myinfo,struct iguana_info *co
void iguana_helper(void *arg) void iguana_helper(void *arg)
{ {
static uint64_t helperidbits; static uint64_t helperidbits;
cJSON *argjson=0; int32_t iter,n,j,numpeers,polltimeout,type,helperid=rand(),flag,allcurrent,idle=0; cJSON *argjson=0; int32_t iter,n,i,j,numpeers,polltimeout,type,helperid=rand(),flag,allcurrent,idle=0;
struct iguana_helper *ptr; struct iguana_info *coin,*tmp; struct OS_memspace MEM,*MEMB; struct iguana_bundle *bp; struct supernet_info *myinfo = SuperNET_MYINFO(0); struct iguana_helper *ptr; struct iguana_info *coin,*tmp; struct OS_memspace MEM,*MEMB; struct iguana_bundle *bp; struct supernet_info *myinfo = SuperNET_MYINFO(0);
helperid %= 64; helperid %= 64;
if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 ) if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 )
@ -715,7 +715,13 @@ void iguana_helper(void *arg)
if ( bp->emitfinish != 0 && time(NULL) > bp->emitfinish+60 ) if ( bp->emitfinish != 0 && time(NULL) > bp->emitfinish+60 )
{ {
if ( bp->validated == 0 ) if ( bp->validated == 0 )
iguana_bundlevalidate(myinfo,coin,bp,1); {
for (i=0; i<j; i++)
if ( coin->bundles[i] == 0 || coin->bundles[i]->validated <= 1 )
break;
if ( i == j )
iguana_bundlevalidate(myinfo,coin,bp,1);
}
} }
} }
} }

2
iguana/iguana_bundles.c

@ -1066,7 +1066,7 @@ int32_t iguana_bundlefinalize(struct supernet_info *myinfo,struct iguana_info *c
//coin->spendvectorsaved = 0; //coin->spendvectorsaved = 0;
for (i=0; i<coin->bundlescount; i++) for (i=0; i<coin->bundlescount; i++)
if ( (tmpbp= coin->bundles[i]) != 0 ) if ( (tmpbp= coin->bundles[i]) != 0 )
tmpbp->converted = tmpbp->balancefinish = tmpbp->validated = 0; tmpbp->converted = tmpbp->balancefinish = 0;
#ifdef __PNACL__ #ifdef __PNACL__
iguana_bundlevalidate(myinfo,coin,bp,1); iguana_bundlevalidate(myinfo,coin,bp,1);
#endif #endif

3
iguana/iguana_spendvectors.c

@ -1105,9 +1105,10 @@ int32_t iguana_bundlevalidate(struct supernet_info *myinfo,struct iguana_info *c
if ( coin->chain->zcash != 0 ) if ( coin->chain->zcash != 0 )
{ {
printf("need to process joinsplits before can validate.%s\n",coin->symbol); printf("need to process joinsplits before can validate.%s\n",coin->symbol);
bp->validated = (uint32_t)time(NULL);
return(bp->n); return(bp->n);
} }
if ( (coin->MAXPEERS > 1 && coin->VALIDATENODE == 0 && coin->FULLNODE == 0) || bp->ramchain.from_ro != 0 || bp == coin->current ) if ( (coin->MAXPEERS > 1 && coin->VALIDATENODE == 0 && coin->FULLNODE == 0) || bp->ramchain.from_ro != 0 )//|| bp == coin->current )
{ {
bp->validated = (uint32_t)time(NULL); bp->validated = (uint32_t)time(NULL);
return(bp->n); return(bp->n);

Loading…
Cancel
Save