From ac201d627c2e66f104185be8d8819e7938c5dec2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 26 Jun 2016 13:21:27 -0300 Subject: [PATCH] test --- gecko/gecko_blocks.c | 1 + iguana/iguana_init.c | 2 +- iguana/iguana_realtime.c | 4 ++-- includes/iguana_funcs.h | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gecko/gecko_blocks.c b/gecko/gecko_blocks.c index 3c8bdbeb0..c024c8261 100755 --- a/gecko/gecko_blocks.c +++ b/gecko/gecko_blocks.c @@ -144,6 +144,7 @@ int32_t gecko_hwmset(struct supernet_info *myinfo,struct iguana_info *virt,struc if ( (bp= virt->bundles[hdrsi]) != 0 ) { bp->numsaved++; + iguana_RTramchainalloc("RTbundle",virt,bp); iguana_realtime_update(myinfo,virt); if ( (block->height % virt->chain->bundlesize) == 13 && hdrsi > 0 && (prevbp= virt->bundles[hdrsi - 1]) != 0 && prevbp->emitfinish == 0 && prevbp->numsaved >= prevbp->n ) { diff --git a/iguana/iguana_init.c b/iguana/iguana_init.c index d82c22114..b10e0d4a2 100755 --- a/iguana/iguana_init.c +++ b/iguana/iguana_init.c @@ -364,7 +364,7 @@ void iguana_parseline(struct iguana_info *coin,int32_t iter,FILE *fp) } if ( iter == 1 && bits256_nonz(lastbundle) != 0 ) { - printf("parseline ht.%d\n",lastheight); + printf("%s parseline ht.%d\n",coin->symbol,lastheight); iguana_initfinal(coin,lastbundle); } } diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index b42f86d84..e4734e99b 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -93,7 +93,7 @@ void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_b } if ( coin->RTramchain.H.data == 0 ) { - printf("ALLOC RTramchain\n"); + printf("ALLOC RTramchain.(%s)\n",fname); iguana_ramchainopen(fname,coin,dest,&coin->RTmem,&coin->RThashmem,bp->bundleheight,bp->hashes[0]); dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti; dest->externalind = dest->H.stacksize = 0; @@ -207,7 +207,7 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info * double startmillis0; static double totalmillis0; static int32_t num0; struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t offset,bundlei,i,n,flag=0; bits256 hash2,*ptr; struct iguana_peer *addr; struct iguana_block *block=0; struct iguana_blockRO *B; struct iguana_ramchain *dest=0,blockR; - if ( coin->peers == 0 ) + if ( coin->peers == 0 && coin->virtualchain == 0 ) return(0); offset = (strcmp("BTC",coin->symbol) != 0); if ( coin->current != 0 && (coin->blocks.hwmchain.height % coin->chain->bundlesize) == coin->chain->bundlesize-1 && coin->blocks.hwmchain.height/coin->chain->bundlesize == coin->longestchain/coin->chain->bundlesize ) diff --git a/includes/iguana_funcs.h b/includes/iguana_funcs.h index 818366bd5..bff8d51cf 100755 --- a/includes/iguana_funcs.h +++ b/includes/iguana_funcs.h @@ -526,6 +526,7 @@ int32_t iguana_opreturn(struct supernet_info *myinfo,int32_t ordered,struct igua int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint64_t scriptpos,int32_t scriptlen); struct iguana_peer *basilisk_ensurerelay(struct supernet_info *myinfo,struct iguana_info *btcd,uint32_t ipbits); int32_t iguana_datachain_scan(struct supernet_info *myinfo,struct iguana_info *coin,uint8_t rmd160[20]); +void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp); #include "../includes/iguana_api.h"