From a8684145ad2305283db87dfc55abd47dec835be8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 18 Apr 2016 01:27:19 -0500 Subject: [PATCH] test --- iguana/iguana_unspents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index c3fcbd7c5..d4b25c65d 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1721,16 +1721,16 @@ void *iguana_ramchainfile(struct iguana_info *coin,struct iguana_ramchain *dest, void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp) { - uint32_t i,changed = 0; struct iguana_ramchain *dest = &coin->RTramchain; struct iguana_blockRO *B; - if ( dest->H.data != 0 ) + uint32_t i,changed = 0; struct iguana_ramchaindata *rdata; struct iguana_ramchain *dest = &coin->RTramchain; struct iguana_blockRO *B; + if ( (rdata= dest->H.data) != 0 ) { i = 0; - if ( coin->RTheight != bp->bundleheight + dest->H.data->numblocks ) + if ( coin->RTheight != bp->bundleheight + rdata->numblocks ) changed++; else { - B = (void *)(long)((long)dest->H.data + dest->H.data->Boffset); - for (i=0; iH.data->numblocks; i++) + B = (void *)(long)((long)rdata + rdata->Boffset); + for (i=0; inumblocks; i++) if ( bits256_cmp(B[i].hash2,bp->hashes[i]) != 0 ) { char str[65],str2[65]; printf("mismatched hash2 at %d %s vs %s\n",bp->bundleheight+i,bits256_str(str,B[i].hash2),bits256_str(str2,bp->hashes[i])); @@ -1740,7 +1740,7 @@ void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_b } if ( changed != 0 ) { - printf("RTramchain changed %d bundlei.%d | coin->RTheight %d != %d bp->bundleheight + %d coin->RTramchain.H.data->numblocks\n",coin->RTheight,i,coin->RTheight,bp->bundleheight,dest->H.data->numblocks); + printf("RTramchain changed %d bundlei.%d | coin->RTheight %d != %d bp->bundleheight + %d coin->RTramchain.H.data->numblocks\n",coin->RTheight,i,coin->RTheight,bp->bundleheight,rdata->numblocks); //coin->RTheight = coin->balanceswritten * coin->chain->bundlesize; iguana_RTramchainfree(coin,bp); }