From cecf2111732b8321d2935f605592ca833eba76c5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Sep 2016 06:23:46 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 23 ++++++++++++++++------- iguana/iguana_spendvectors.c | 4 ++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 779ceb2d8..c0184b8e1 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -453,9 +453,9 @@ void iguana_update_balances(struct iguana_info *coin) { iguana_volatilespurge(coin,&bp->ramchain); sprintf(fname,"%s/%s/accounts/debits.%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight); - OS_removefile(fname,0); + OS_removefile(fname,0); sprintf(fname,"%s/%s/accounts/lastspends.%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight); - OS_removefile(fname,0); + OS_removefile(fname,0); iguana_volatilesalloc(coin,&bp->ramchain,0);//i < hdrsi); } printf("accounts files purged\n"); @@ -476,13 +476,22 @@ void iguana_update_balances(struct iguana_info *coin) } } else printf("null bp.[%d]\n",hdrsi); } + //if ( max != coin->origbalanceswritten ) + { + coin->balanceflush = max+1; + while ( coin->balanceflush != 0 ) + sleep(3); + }// else printf("skip flush when max.%d and orig.%d\n",max,coin->origbalanceswritten); } - //if ( max != coin->origbalanceswritten ) + else { - coin->balanceflush = max+1; - while ( coin->balanceflush != 0 ) - sleep(3); - }// else printf("skip flush when max.%d and orig.%d\n",max,coin->origbalanceswritten); + for (i=0; ibundles[i]) != 0 && bp != coin->current ) + { + iguana_volatilespurge(coin,&bp->ramchain); + iguana_volatilesmap(coin,&bp->ramchain); + } + } } int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int32_t helperid,int32_t convertflag) diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 145d0e90c..3a34b96f5 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -913,8 +913,8 @@ int32_t iguana_balanceflush(struct supernet_info *myinfo,struct iguana_info *coi }*/ if ( (hdrsi % 100) == 0 ) printf("%s -> %s\n",fname,destfname); - OS_removefile(fname,0); - OS_removefile(fname2,0); + //OS_removefile(fname,0); + //OS_removefile(fname2,0); } if ( bp->ramchain.allocatedA2 == 0 || bp->ramchain.allocatedU2 == 0 ) {