Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ac201d627c
  1. 1
      gecko/gecko_blocks.c
  2. 2
      iguana/iguana_init.c
  3. 4
      iguana/iguana_realtime.c
  4. 1
      includes/iguana_funcs.h

1
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 ) if ( (bp= virt->bundles[hdrsi]) != 0 )
{ {
bp->numsaved++; bp->numsaved++;
iguana_RTramchainalloc("RTbundle",virt,bp);
iguana_realtime_update(myinfo,virt); 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 ) if ( (block->height % virt->chain->bundlesize) == 13 && hdrsi > 0 && (prevbp= virt->bundles[hdrsi - 1]) != 0 && prevbp->emitfinish == 0 && prevbp->numsaved >= prevbp->n )
{ {

2
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 ) 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); iguana_initfinal(coin,lastbundle);
} }
} }

4
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 ) 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]); 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->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti;
dest->externalind = dest->H.stacksize = 0; 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; 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_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; 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); return(0);
offset = (strcmp("BTC",coin->symbol) != 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 ) 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 )

1
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); 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); 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]); 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" #include "../includes/iguana_api.h"

Loading…
Cancel
Save