Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
2eb88f55a5
  1. 6
      iguana/iguana_realtime.c
  2. 4
      iguana/iguana_unspents.c

6
iguana/iguana_realtime.c

@ -300,7 +300,11 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info *
if ( (block= iguana_bundleblock(coin,&hash2,bp,bundlei)) != 0 )
{
iguana_bundlehashadd(coin,bp,bundlei,block);
//printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block));
printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block));
}
else
{
printf("cant find bundleblock [%d:%d]\n",bp->hdrsi,bundlei);
}
if ( coin->RTdatabad == 0 && block != 0 && (block->height == 0 || bits256_nonz(block->RO.prev_block) != 0) )
{

4
iguana/iguana_unspents.c

@ -526,7 +526,7 @@ int32_t iguana_pkhasharray(struct supernet_info *myinfo,struct iguana_info *coin
int64_t iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *array,int32_t minconf,int32_t maxconf,uint8_t *rmdarray,int32_t numrmds,int32_t lastheight,int64_t *unspents,int32_t *numunspentsp,char *remoteaddr)
{
int64_t total=0,sum=0; struct iguana_pkhash *P; uint8_t *addrtypes,*pubkeys; int32_t i,numunspents,maxunspents,flag = 0; char coinaddr[64];
portable_mutex_lock(&coin->RTmutex);
//portable_mutex_lock(&coin->RTmutex);
if ( coin->RTramchain_busy != 0 )
fprintf(stderr,"iguana_pkhasharray: unexpected access when RTramchain_busy\n");
numunspents = 0;
@ -553,7 +553,7 @@ int64_t iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJ
*numunspentsp = numunspents;
if ( flag != 0 && rmdarray != 0 )
free(rmdarray);
portable_mutex_unlock(&coin->RTmutex);
//portable_mutex_unlock(&coin->RTmutex);
return(sum);
}

Loading…
Cancel
Save