From d4d343ba41e6816b0cac1fdf3a03dc4a36cde4ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Apr 2016 14:25:56 -0500 Subject: [PATCH] test --- iguana/iguana_unspents.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index ec7a7a4bb..66602f150 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -82,7 +82,7 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t } if ( numHHUTXO+1 >= maxHHUTXO ) { - maxHHUTXO += 1000000; + maxHHUTXO += 1; HHUTXO = realloc(HHUTXO,sizeof(*HHUTXO) * maxHHUTXO); } hhutxo = &HHUTXO[numHHUTXO++]; @@ -93,7 +93,7 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t { if ( numHHACCT+1 >= maxHHACCT ) { - maxHHACCT += 1000000; + maxHHACCT += 1; HHACCT = realloc(HHACCT,sizeof(*HHACCT) * maxHHACCT); } hhacct = &HHACCT[numHHACCT++];//calloc(1,sizeof(*hhacct)); @@ -1319,7 +1319,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,int32_t incremental,struct ig { if ( 0 && bp == coin->current ) printf("[%d] spendind.%u -> [%d] u%d\n",bp->hdrsi,spendind,spent_hdrsi,spent_unspentind); - if ( iguana_volatileupdate(coin,incremental,&spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 ) + if ( iguana_volatileupdate(coin,incremental,spentbp == coin->current ? &coin->RTramchain : &spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 ) errs++; } else //if ( Xspendinds != 0 )