diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 0e563e5ef..406140bf1 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -317,7 +317,7 @@ void iguana_balancesQ(struct iguana_info *coin,struct iguana_bundle *bp) if ( bp->balancefinish == 0 ) bp->balancefinish = 1; coin->pendbalances++; - //printf("BALANCES Q[%d] %s bundle.%d[%d] balances.%u balancefinish.%u\n",coin->pendbalances,coin->symbol,ptr->hdrsi,bp->n,bp->utxofinish,bp->balancefinish); + printf("BALANCES Q[%d] %s bundle.%d[%d] balances.%u balancefinish.%u\n",coin->pendbalances,coin->symbol,ptr->hdrsi,bp->n,bp->utxofinish,bp->balancefinish); queue_enqueue("balancesQ",&balancesQ,&ptr->DL,0); } diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index c9230f384..89d53f1b2 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -789,14 +789,15 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp) bp->utxofinish = (uint32_t)time(NULL); bp->balancefinish = 0; } - if ( bp->balancefinish <= 1 ) + if ( bp->balancefinish == 0 ) iguana_balancesQ(coin,bp); return(1); } else printf("UTXO gen.[%d] utxo error\n",bp->hdrsi); } else if ( bp->utxofinish != 0 ) { - iguana_balancesQ(coin,bp); + if ( bp->balancefinish == 0 ) + iguana_balancesQ(coin,bp); return(1); } } // else printf("%u notready postfinish.%d startutxo.%u prevbp.%d %u current.%d\n",(uint32_t)time(NULL),bp->hdrsi,bp->startutxo,prevbp!=0?prevbp->hdrsi:-1,prevbp!=0?prevbp->emitfinish:0,coin->current!=0?coin->current->hdrsi:-1); diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index a43b2bf6c..70c487efd 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -137,7 +137,7 @@ uint32_t iguana_rwiAddrind(struct iguana_info *coin,int32_t rwflag,struct iguana fseek(fp,m*sizeof(tmp),SEEK_SET); fwrite(&tmp,1,sizeof(tmp),fp); expand_ipbits(hexstr,ipbits); - printf("create rwiAddrind m.%-4d %08x %s\n",m,(uint32_t)tmp.ipbits,hexstr); + //printf("create rwiAddrind m.%-4d %08x %s\n",m,(uint32_t)tmp.ipbits,hexstr); m++; coin->numiAddrs = m; iguana_possible_peer(coin,hexstr); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 4c48eb7c5..d0c1dadef 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1091,7 +1091,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) ) { #ifdef IGUANA_SERIALIZE_BALANCEGEN - for (j=0; jbundlescount; j++) + for (j=0; jbundlescount-1; j++) { if ( (prevbp= coin->bundles[j]) == 0 || prevbp->utxofinish <= 1 ) { diff --git a/iguana/main.c b/iguana/main.c index 60ba2e764..4fd416d32 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1132,7 +1132,7 @@ void iguana_main(void *arg) sleep(1); char *str; //iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}")); - if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":512,\"endpend\":512,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":512,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0)) != 0 ) + if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":2048,\"endpend\":2048,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":512,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0)) != 0 ) { free(str); if ( 0 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0)) != 0 )