diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 2cf8b0ef8..d26c860ff 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -297,7 +297,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,struct iguana_bundle *bp) static uint64_t total,emitted; int32_t spendind,n,txidind,errs=0,emit=0,i,j,k,retval = -1; uint32_t unspentind; struct iguana_bundle *spentbp; struct iguana_blockRO *B; - FILE *fp; char fname[1024],str[65]; uint32_t now=0; + FILE *fp; char fname[1024],str[65]; bits256 prevhash,zero,sha256; struct iguana_unspent *u; long fsize; struct iguana_txid *nextT; struct iguana_spend *S,*s; struct iguana_spendvector *ptr; struct iguana_ramchain *ramchain; ramchain = &bp->ramchain; @@ -314,7 +314,6 @@ int32_t iguana_utxogen(struct iguana_info *coin,struct iguana_bundle *bp) } ptr = mycalloc('x',sizeof(*ptr),n); total += n; - now = (uint32_t)time(NULL); //printf("start UTXOGEN.%d max.%d ptr.%p\n",bp->bundleheight,n,ptr); txidind = spendind = ramchain->H.data->firsti; for (i=0; in; i++) @@ -327,7 +326,6 @@ int32_t iguana_utxogen(struct iguana_info *coin,struct iguana_bundle *bp) } for (j=0; jH.data + ramchain->H.data->Soffset); B = (void *)(long)((long)ramchain->H.data + ramchain->H.data->Boffset); nextT = (void *)(long)((long)ramchain->H.data + ramchain->H.data->Toffset); - numtxid = 1; refheight = bp->bundleheight; if ( ramchain->Xspendinds == 0 ) { @@ -454,19 +451,20 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3 txidind = spendind = ramchain->H.data->firsti; for (i=0; in; i++) { + printf("hdrs.[%d] B[%d] 1st txidind.%d txn_count.%d firstvin.%d firstvout.%d\n",bp->hdrsi,i,B[i].firsttxidind,B[i].txn_count,B[i].firstvin,B[i].firstvout); if ( txidind != B[i].firsttxidind || spendind != B[i].firstvin ) { - printf("balancegen: txidind %u != %u B[%d].firsttxidind || spendind %u != %u B[%d].firstvin\n",txidind,B[i].firsttxidind,i,spendind,B[i].firstvin,i); + printf("balancegen: txidind %u != %u B[%d].firsttxidind || spendind %u != %u B[%d].firstvin errs.%d\n",txidind,B[i].firsttxidind,i,spendind,B[i].firstvin,i,errs); return(-1); } for (j=0; j