From 31c865c8ff989abdf1dbfd2d21de3766f8d7effd Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 20 Aug 2016 21:45:40 -0300 Subject: [PATCH] test --- iguana/iguana_unspents.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 1bf2201ab..4864f88f9 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1197,7 +1197,7 @@ int32_t iguana_utxoaddr_check(struct supernet_info *myinfo,struct iguana_info *c return(0); } -int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info *coin,int32_t lastheight) +int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info *coin,int32_t lastheight,int32_t count) { int64_t *unspents; uint8_t *item; struct iguana_bundle *bp; struct iguana_utxoaddr UA; int32_t i,num,max,ind,total,errs=0; if ( coin->utxoaddrtable == 0 ) @@ -1216,9 +1216,7 @@ int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info iguana_volatilesmap(coin,&bp->ramchain); } total = 0; - max = 1024 * 1024; - if ( strcmp("BTC",coin->symbol) == 0 ) - max *= 1024; + max = 1024 * 1024 * 1024; unspents = calloc(1,max); max /= sizeof(*unspents); memset(&UA,0,sizeof(UA)); @@ -1232,8 +1230,6 @@ int32_t iguana_utxoaddr_validate(struct supernet_info *myinfo,struct iguana_info iguana_rwutxoaddr(0,ind,item,&UA); errs += iguana_utxoaddr_check(myinfo,coin,lastheight,unspents,max,&UA); total++; - //if ( (total % 1000) == 0 ) - // fprintf(stderr,"."); } } } @@ -1386,7 +1382,7 @@ continue; if ( iguana_utxoaddr_map(coin,fname) != 0 ) { printf("validating %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs); - errs = iguana_utxoaddr_validate(myinfo,coin,height); + errs = iguana_utxoaddr_validate(myinfo,coin,height,total); printf("gen %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs); if ( errs != 0 || height == 0 ) {