From e506119bb95cf5ad7dbd60d7406603903555ef14 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 15 Mar 2016 06:52:01 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 3 +-- iguana/main.c | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 90df2f6f9..e55af987a 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -400,7 +400,7 @@ void iguana_coinflush(struct iguana_info *coin) int32_t hdrsi; struct iguana_bundle *bp; char fname[1024],fname2[1024]; FILE *fp,*fp2=0; for (hdrsi=0; hdrsibundlescount; hdrsi++) { - if ( (bp= coin->bundles[hdrsi]) != 0 && time(NULL) > bp->dirty+60 && bp->ramchain.H.data != 0 && bp->ramchain.A != 0 && bp->ramchain.Uextras != 0 ) + if ( (bp= coin->bundles[hdrsi]) != 0 && time(NULL) > bp->dirty+600 && bp->ramchain.H.data != 0 && bp->ramchain.A != 0 && bp->ramchain.Uextras != 0 ) { sprintf(fname,"accounts/%s/debits.%d",coin->symbol,bp->bundleheight); sprintf(fname2,"accounts/%s/lastspends.%d",coin->symbol,bp->bundleheight); @@ -494,7 +494,6 @@ void iguana_coinloop(void *arg) if ( coin->longestchain+10000 > coin->blocks.maxbits ) iguana_recvalloc(coin,coin->longestchain + 100000); } - iguana_coinflush(coin); } } if ( flag == 0 ) diff --git a/iguana/main.c b/iguana/main.c index bcc637604..3569ef5a1 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -338,7 +338,7 @@ void iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp) void mainloop(struct supernet_info *myinfo) { - int32_t flag; struct iguana_helper *ptr; + int32_t flag,i; struct iguana_helper *ptr; struct iguana_info *coin; while ( 1 ) { flag = 0; @@ -361,6 +361,9 @@ void mainloop(struct supernet_info *myinfo) iguana_balancecalc(ptr->coin,ptr->bp); myfree(ptr,ptr->allocsize); } + for (i=0; iactive != 0 ) + iguana_coinflush(coin); if ( flag == 0 ) { usleep(10000);