Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e506119bb9
  1. 3
      iguana/iguana777.c
  2. 5
      iguana/main.c

3
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; int32_t hdrsi; struct iguana_bundle *bp; char fname[1024],fname2[1024]; FILE *fp,*fp2=0;
for (hdrsi=0; hdrsi<coin->bundlescount; hdrsi++) for (hdrsi=0; hdrsi<coin->bundlescount; 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(fname,"accounts/%s/debits.%d",coin->symbol,bp->bundleheight);
sprintf(fname2,"accounts/%s/lastspends.%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 ) if ( coin->longestchain+10000 > coin->blocks.maxbits )
iguana_recvalloc(coin,coin->longestchain + 100000); iguana_recvalloc(coin,coin->longestchain + 100000);
} }
iguana_coinflush(coin);
} }
} }
if ( flag == 0 ) if ( flag == 0 )

5
iguana/main.c

@ -338,7 +338,7 @@ void iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp)
void mainloop(struct supernet_info *myinfo) 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 ) while ( 1 )
{ {
flag = 0; flag = 0;
@ -361,6 +361,9 @@ void mainloop(struct supernet_info *myinfo)
iguana_balancecalc(ptr->coin,ptr->bp); iguana_balancecalc(ptr->coin,ptr->bp);
myfree(ptr,ptr->allocsize); myfree(ptr,ptr->allocsize);
} }
for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->active != 0 )
iguana_coinflush(coin);
if ( flag == 0 ) if ( flag == 0 )
{ {
usleep(10000); usleep(10000);

Loading…
Cancel
Save