diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index da7fe7484..1b2d77f77 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1244,7 +1244,7 @@ int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coin,int32_t maxheight) { - char fname[1024],fname2[1024],coinaddr[64],str[65],checkaddr[64]; struct iguana_utxoaddr *utxoaddr,UA,*tmp,*last=0; uint16_t hdrsi; uint8_t *table,item[UTXOADDR_ITEMSIZE]; uint32_t *counts,*offsets,offset,n; int32_t errs=0,height=0,j,k,ind,tablesize=0; struct iguana_bundle *bp; struct iguana_block *block; struct iguana_ramchaindata *rdata=0; int64_t checkbalance=0,balance = 0; + char fname[1024],fname2[1024],coinaddr[64],str[65],checkaddr[64]; struct iguana_utxoaddr *utxoaddr,UA,*tmp,*last=0; uint16_t hdrsi; uint8_t *table,item[UTXOADDR_ITEMSIZE]; uint32_t *counts,*offsets,offset,n; int32_t total,errs=0,height=0,j,k,ind,tablesize=0; struct iguana_bundle *bp; struct iguana_block *block; struct iguana_ramchaindata *rdata=0; int64_t checkbalance=0,balance = 0; for (hdrsi=0; hdrsibundlescount-1; hdrsi++) { if ( (bp= coin->bundles[hdrsi]) != 0 && bp->bundleheight < maxheight ) @@ -1307,7 +1307,9 @@ int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coi counts[ind]++; } else printf("error neg or zero balance %.8f\n",dstr(utxoaddr->histbalance)); } - printf("checkbalance %.8f vs %.8f\n",dstr(checkbalance),dstr(balance)); + for (ind=total=0; ind<0x10000; ind++) + total += counts[ind]; + printf("checkbalance %.8f vs %.8f, total %d\n",dstr(checkbalance),dstr(balance),total); if ( checkbalance == balance ) { table = calloc(coin->utxoaddrind+1,UTXOADDR_ITEMSIZE);