From 4bfde94a9c7e33d4f1960b56b509c774ce8422c8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 15 Mar 2016 04:19:23 -0300 Subject: [PATCH] test --- iguana/iguana_ramchain.c | 6 +++++- iguana/iguana_unspents.c | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 1013542c1..14091a2f5 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -46,7 +46,11 @@ struct iguana_kvitem *iguana_hashsetPT(struct iguana_ramchain *ramchain,int32_t { if ( ramchain->hashmem != 0 ) ptr = iguana_memalloc(ramchain->hashmem,allocsize,1); - else ptr = mycalloc('e',1,allocsize); + else + { + ptr = mycalloc('e',1,allocsize); + printf("alloc.%d\n",allocsize); + } if ( ptr == 0 ) printf("fatal alloc error in hashset\n"), exit(-1); if ( 0 && ramchain->expanded && selector == 'T' ) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index aca6b78ad..9c2c13092 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -312,9 +312,9 @@ int32_t iguana_utxogen(struct iguana_info *coin,struct iguana_bundle *bp) printf("error mapping Xspendmap.(%s)\n",fname); retval = -1; } - int32_t i; for (i=0; inumXspends; i++) - printf("(%d u%d) ",ramchain->Xspendinds[i].hdrsi,ramchain->Xspendinds[i].ind); - printf("filesize %ld Xspendptr.%p %p num.%d\n",fsize,ramchain->Xspendptr,ramchain->Xspendinds,ramchain->numXspends); + //int32_t i; for (i=0; inumXspends; i++) + // printf("(%d u%d) ",ramchain->Xspendinds[i].hdrsi,ramchain->Xspendinds[i].ind); + //printf("filesize %ld Xspendptr.%p %p num.%d\n",fsize,ramchain->Xspendptr,ramchain->Xspendinds,ramchain->numXspends); } else printf("Error creating.(%s)\n",fname); } else printf("error getting utxo fname\n"); } @@ -359,7 +359,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp) printf("iguana_balancegen[%d] s.%d illegal hdrsi.%d emit.%d\n",bp->hdrsi,spendind,hdrsi,emit); errs++; } - printf("%d of %d: [%d] X spendind.%d -> (%d u%d)\n",emit,ramchain->numXspends,bp->hdrsi,spendind,hdrsi,unspentind); + //printf("%d of %d: [%d] X spendind.%d -> (%d u%d)\n",emit,ramchain->numXspends,bp->hdrsi,spendind,hdrsi,unspentind); emit++; } } @@ -383,7 +383,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp) printf("iguana_balancegen txidind overflow %u vs %u\n",txidind,spentbp->ramchain.H.data->numtxids); errs++; } - printf("[%d] spendind.%d -> (hdrsi.%d u%d)\n",bp->hdrsi,spendind,hdrsi,unspentind); + //printf("[%d] spendind.%d -> (hdrsi.%d u%d)\n",bp->hdrsi,spendind,hdrsi,unspentind); } else continue; if ( unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents ) @@ -421,7 +421,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp) } if ( emit != ramchain->numXspends ) errs++; - printf(">>>>>>>> balances.%d done errs.%d\n",bp->hdrsi,errs); + printf(">>>>>>>> balances.%d done errs.%d spendind.%d\n",bp->hdrsi,errs,n); return(-errs); }