From f6cbed8e9cf2190976e79de0933f88faf230d22c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 17 Mar 2016 06:25:51 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 7 ++++++- iguana/iguana777.h | 2 +- iguana/iguana_bundles.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 509f76fae..50f289e0d 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -496,11 +496,16 @@ void iguana_coinloop(void *arg) { fprintf(stderr,">>>>>>> %s isRT blockrecv.%d vs longest.%d\n",coin->symbol,coin->blocksrecv,coin->longestchain); coin->isRT = 1; - iguana_coinflush(coin,1); if ( coin->polltimeout > 100 ) coin->polltimeout = 100; coin->MAXPEERS = 8; } + if ( coin->isRT != 0 && coin->numverified >= coin->bundlescount ) + { + static int32_t saved; + if ( saved++ == 0 ) + iguana_coinflush(coin,1); + } if ( coin->bindsock >= 0 ) { if ( coin->peers.numranked < 8 && now > coin->lastpossible+60 ) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 628f62e5a..cea024196 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -473,7 +473,7 @@ struct iguana_info portable_mutex_t scripts_mutex[2]; FILE *scriptsfp[2]; void *scriptsptr[2]; long scriptsfilesize[2]; //struct scriptinfo *scriptstable[2]; struct iguana_bundle *bundles[IGUANA_MAXBUNDLES],*current,*lastpending; - int32_t numremain,numpendings,zcount,recvcount,bcount,pcount,lastbundle,numsaved,pendbalances; + int32_t numremain,numpendings,zcount,recvcount,bcount,pcount,lastbundle,numsaved,pendbalances,numverified; uint32_t recvtime,hdrstime,backstoptime,lastbundletime,numreqsent,numbundlesQ,lastbundleitime; double backstopmillis; bits256 backstophash2; int64_t spaceused; int32_t initialheight,mapflags,minconfirms,numrecv,bindsock,isRT,backstop,blocksrecv,merging,polltimeout,numreqtxids,allhashes; bits256 reqtxids[64]; diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 5b7f6c963..27f5bc7e6 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -524,6 +524,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str) else coin->lastpending = coin->bundles[coin->bundlescount - 1]; coin->numsaved = numsaved; coin->spaceused = spaceused; + coin->numverified = numv; char str4[65]; sprintf(str,"v.%d/%d (%d 1st.%d) to %d N[%d] Q.%d h.%d r.%d c.%s s.%d d.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d Q.(%d %d)",numv,coin->pendbalances,firstgap!=0?firstgap->numsaved:0,firstgap!=0?firstgap->hdrsi:0,coin->lastpending!=0?coin->lastpending->hdrsi:0,count,coin->numbundlesQ,numhashes,coin->blocksrecv,mbstr(str4,spaceused),numsaved,done,numemit,coin->numreqsent,coin->blocks.hwmchain.height,coin->longestchain,coin->MAXBUNDLES,mbstr(str2,estsize),(int32_t)difft.x/3600,(int32_t)(difft.x/60)%60,(int32_t)difft.x%60,difft.millis,p,coin->MAXPEERS,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ)); //sprintf(str+strlen(str),"%s.%-2d %s time %.2f files.%d Q.%d %d\n",coin->symbol,flag,str,(double)(time(NULL)-coin->starttime)/60.,coin->peers.numfiles,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));