diff --git a/iguana/iguana777.c b/iguana/iguana777.c index c584169ae..797a49f54 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -525,6 +525,7 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int if ( helperid == 0 ) { coin->spendvectorsaved = (uint32_t)time(NULL); + coin->spendvalidated = 0; printf("%s UTXOGEN spendvectorsaved <- %u\n",coin->symbol,coin->spendvectorsaved); } else @@ -571,12 +572,14 @@ void iguana_helper(void *arg) { if ( coin->spendvectorsaved == 1 ) iguana_utxogen(myinfo,coin,helperid,0); - else if ( coin->spendvectorsaved > 1 ) + else if ( coin->spendvectorsaved > 1 && (coin->spendvalidated & (1 << helperid)) == 0 ) { printf("%s spendvectorsaved.%u helperid.%d validate\n",coin->symbol,coin->spendvectorsaved,helperid); for (j=helperid; jbundlescount-1; j+=IGUANA_NUMHELPERS) if ( (bp= coin->bundles[j]) != 0 ) iguana_bundlevalidate(coin,bp,0); + if ( helperid == 0 ) + coin->spendvalidated |= (1 << helperid); printf("DONE %s spendvectorsaved.%u helperid.%d validate\n",coin->symbol,coin->spendvectorsaved,helperid); } } diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 1dabcee8f..c0d8050da 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -970,6 +970,7 @@ int32_t iguana_spendvectorsaves(struct iguana_info *coin) } } coin->spendvectorsaved = (uint32_t)time(NULL); + coin->spendvalidated = 0; return(0); } diff --git a/includes/iguana_structs.h b/includes/iguana_structs.h index 987a4b64c..678aa0939 100755 --- a/includes/iguana_structs.h +++ b/includes/iguana_structs.h @@ -391,7 +391,7 @@ struct iguana_info int64_t mining,totalfees,TMPallocated,MAXRECVCACHE,MAXMEM,PREFETCHLAG,estsize,activebundles; int32_t MAXPEERS,MAXPENDINGREQUESTS,MAXBUNDLES,MAXSTUCKTIME,active,closestbundle,numemitted,lastsweep,numemit,startutc,newramchain,numcached,cachefreed,helperdepth,startPEND,endPEND,enableCACHE,RELAYNODE,VALIDATENODE,origbalanceswritten,balanceswritten,RTheight,RTdatabad; bits256 balancehash,allbundles; - uint32_t lastsync,parsetime,numiAddrs,lastpossible,bundlescount,savedblocks,backlog,spendvectorsaved,laststats,lastinv2,symbolcrc; char VALIDATEDIR[512]; + uint32_t lastsync,parsetime,numiAddrs,lastpossible,bundlescount,savedblocks,backlog,spendvectorsaved,laststats,lastinv2,symbolcrc,spendvalidated; char VALIDATEDIR[512]; int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy,stuckiters,virtualchain; struct tai starttime; double startmillis; struct iguana_chain *chain;