diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index b9f4ebb8e..f0af0df70 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -607,7 +607,7 @@ void iguana_startconnection(void *arg) printf("iguana_startconnection.%s mismatched coin.%p (%s) vs (%s)\n",addr->ipaddr,coin,coin->symbol,addr->coinstr); return; } - printf("MYSERVICES.%llx\n",(long long)coin->myservices); + //printf("MYSERVICES.%llx\n",(long long)coin->myservices); if ( strcmp("127.0.0.1",addr->ipaddr) == 0 && (coin->myservices & NODE_NETWORK) != 0 ) { iguana_iAkill(coin,addr,0); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 8facc95b1..1301782d1 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -247,9 +247,9 @@ uint32_t iguana_sparseadd(uint8_t *bits,uint32_t ind,int32_t width,uint32_t tabl for (x=j=0; j ramchain->sparsemax ) @@ -1374,6 +1374,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int iguana_validateQ(coin,bp); return(flag); } + bp->nexttime = (uint32_t)time(NULL) + 1 + cbrt(bp->hdrsi); if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) ) { #ifdef IGUANA_SERIALIZE_BALANCEGEN diff --git a/iguana/main.c b/iguana/main.c index 1493ebdc3..648018ef5 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -363,13 +363,13 @@ void mainloop(struct supernet_info *myinfo) flag++; if ( (ptr= queue_dequeue(&balancesQ,0)) != 0 ) { - if ( ptr->coin != coin ) + if ( ptr->coin != coin || (bp= ptr->bp) == 0 || time(NULL) < bp->nexttime ) { queue_enqueue("balanceQ",&balancesQ,&ptr->DL,0); continue; } flag++; - if ( coin != 0 && (bp= ptr->bp) != 0 ) + if ( coin != 0 ) { iguana_balancecalc(coin,bp,bp->bundleheight,bp->bundleheight+bp->n-1); if ( coin->active == 0 )