From 213e255108b722cfe88167136d72962d8b052fd0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 23 Apr 2016 12:54:23 -0500 Subject: [PATCH] test --- iguana/iguana_unspents.c | 10 +++++++++- iguana/main.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index f5fb1bc79..034ce8b92 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -2334,7 +2334,11 @@ void iguana_RTspendvectors(struct iguana_info *coin,struct iguana_bundle *bp) for (hdrsi=num=0; hdrsihdrsi; hdrsi++) { #ifdef __APPLE__ - //iguana_ramchain_prefetch(coin,&coin->bundles[hdrsi]->ramchain,2); + if ( coin->bundles[hdrsi]->lastprefetch == 0 ) + { + iguana_ramchain_prefetch(coin,&coin->bundles[hdrsi]->ramchain,2); + coin->bundles[hdrsi]->lastprefetch = (uint32_t)time(NULL); + } #endif num += iguana_convert(coin,IGUANA_NUMHELPERS,coin->bundles[hdrsi],1,orignumemit); } @@ -2483,6 +2487,10 @@ int32_t iguana_realtime_update(struct iguana_info *coin) if ( coin->RTdatabad != 0 ) { iguana_RTramchainfree(coin,bp); + memset(bp->hashes,0,sizeof(bp->hashes)); + memset(bp->blocks,0,sizeof(bp->blocks)); + if ( bp->speculative != 0 ) + memset(bp->speculative,0,sizeof(*bp->speculative)*bp->n); //iguana_RTramchainalloc("RTbundle",coin,bp); } return(flag); diff --git a/iguana/main.c b/iguana/main.c index 9dd339c22..09dc129d2 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1146,7 +1146,7 @@ void iguana_appletests(struct supernet_info *myinfo) exit(-1); } sleep(1);*/ - if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":500,\"endpend\":500,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0,myinfo->rpcport)) != 0 ) + if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":500,\"endpend\":500,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0,myinfo->rpcport)) != 0 ) { free(str); if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0,myinfo->rpcport)) != 0 )