diff --git a/iguana/iguana777.h b/iguana/iguana777.h index d624eeec8..037173998 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -802,6 +802,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr, int32_t iguana_blockreq(struct iguana_info *coin,int32_t height,int32_t priority); int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp); void iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain *ramchain); +void iguana_realtime_update(struct iguana_info *coin); extern int32_t HDRnet,netBLOCKS; diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index a9e252671..ed108b753 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -46,7 +46,7 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,uint16_t spent_hdris,uint32_t void iguana_realtime_update(struct iguana_info *coin) { - + //bp->hdrsi >= coin->longestchain/coin->chain->bundlesize && bp->hdrsi >= coin->balanceswritten } struct iguana_pkhash *iguana_pkhashfind(struct iguana_info *coin,struct iguana_ramchain **ramchainp,int64_t *balancep,uint32_t *lastunspentindp,struct iguana_pkhash *p,uint8_t rmd160[20],int32_t firsti,int32_t endi) @@ -455,7 +455,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3 now = (uint32_t)time(NULL); if ( spentbp != 0 && unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents ) { - if ( spentbp->dirty++ == 3 ) + if ( (spentbp->dirty++ % 100000) == 3 ) { printf("prefetch.[%d]\n",spentbp->hdrsi); iguana_ramchain_prefetch(coin,&spentbp->ramchain); diff --git a/iguana/main.c b/iguana/main.c index 4e40734e5..41e2da335 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -471,7 +471,7 @@ void mainloop(struct supernet_info *myinfo) printf("alloc A2.[%d]\n",bp->hdrsi); bp->ramchain.A = calloc(sizeof(*bp->ramchain.A),bp->ramchain.H.data->numpkinds + 16); } - iguana_balancecalc(ptr->coin,bp,bp->hdrsi >= coin->longestchain/coin->chain->bundlesize && bp->hdrsi >= coin->balanceswritten); + iguana_balancecalc(ptr->coin,bp,0); bp->queued = 0; if ( bp->hdrsi == coin->longestchain/coin->chain->bundlesize-1 ) {