From bf1a35aede915dc50662a6f5c87435e16189977d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 15 Aug 2016 10:49:40 -0300 Subject: [PATCH] test --- iguana/iguana_accept.c | 2 +- iguana/iguana_realtime.c | 2 +- iguana/iguana_spendvectors.c | 2 +- includes/iguana_structs.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/iguana_accept.c b/iguana/iguana_accept.c index c595522d6..118efec55 100755 --- a/iguana/iguana_accept.c +++ b/iguana/iguana_accept.c @@ -326,7 +326,7 @@ int32_t iguana_peerhdrrequest(struct supernet_info *myinfo,struct iguana_info *c } else printf("cant find block at ht.%d\n",height+i); } } - if ( flag != 0 && strcmp("BTCD",coin->symbol) != 0 ) + if ( 0 && flag != 0 && strcmp("BTCD",coin->symbol) != 0 ) retval = iguana_queue_send(addr,0,serialized,"headers",len); //printf("hdrs request retval.%d len.%d\n",retval,len); } //else printf("couldnt find header\n"); diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index 317782b8b..35c66e600 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -24,7 +24,7 @@ return; { printf("free RTramchain\n"); iguana_utxoupdate(coin,-1,0,0,0,0,-1,0); // free hashtables - coin->lastRTheight = coin->RTheight = (coin->bundlescount-1) * coin->chain->bundlesize; + coin->lastRTheight = coin->RTheight = 0;//(coin->bundlescount-1) * coin->chain->bundlesize; coin->RTgenesis = 0; iguana_utxoaddrs_purge(coin); iguana_ramchain_free(coin,&coin->RTramchain,1); diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index b70b19e5f..362865c66 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -708,7 +708,7 @@ int32_t iguana_volatilesinit(struct iguana_info *coin) } } } - if ( (coin->RTheight= coin->balanceswritten * coin->chain->bundlesize) > coin->longestchain ) + if ( (coin->RTheight= (coin->balanceswritten-1) * coin->chain->bundlesize) > coin->longestchain ) coin->longestchain = coin->RTheight; iguana_bundlestats(coin,buf,IGUANA_DEFAULTLAG); if ( (bp= coin->bundles[coin->balanceswritten-1]) != 0 && (block= bp->blocks[bp->n-1]) != 0 ) diff --git a/includes/iguana_structs.h b/includes/iguana_structs.h index 8cd2a8e1e..1dfcce1f0 100755 --- a/includes/iguana_structs.h +++ b/includes/iguana_structs.h @@ -391,10 +391,10 @@ struct iguana_info uint32_t fastfind; FILE *fastfps[0x100]; uint8_t *fast[0x100]; int32_t *fasttables[0x100]; long fastsizes[0x100]; uint64_t instance_nonce,myservices,totalsize,totalrecv,totalpackets,sleeptime; int64_t mining,totalfees,TMPallocated,MAXRECVCACHE,MAXMEM,PREFETCHLAG,estsize,activebundles; - int32_t MAXPEERS,MAXPENDINGREQUESTS,MAXBUNDLES,MAXSTUCKTIME,active,closestbundle,numemitted,lastsweep,numemit,startutc,newramchain,numcached,cachefreed,helperdepth,startPEND,endPEND,enableCACHE,RELAYNODE,VALIDATENODE,origbalanceswritten,balanceswritten,RTheight,lastRTheight,RTdatabad; + int32_t MAXPEERS,MAXPENDINGREQUESTS,MAXBUNDLES,MAXSTUCKTIME,active,closestbundle,numemitted,lastsweep,numemit,startutc,newramchain,numcached,cachefreed,helperdepth,startPEND,endPEND,enableCACHE,RELAYNODE,VALIDATENODE,origbalanceswritten,balanceswritten,lastRTheight,RTdatabad; bits256 balancehash,allbundles; uint32_t lastsync,parsetime,numiAddrs,lastpossible,bundlescount,savedblocks,backlog,spendvectorsaved,laststats,lastinv2,symbolcrc,spendvalidated; char VALIDATEDIR[512]; - int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy,stuckiters,virtualchain; + int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy,stuckiters,virtualchain,RTheight; struct tai starttime; double startmillis; struct iguana_chain *chain; struct iguana_iAddr *iAddrs;