Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
79b746e740
  1. 12
      iguana/iguana_blocks.c
  2. 2
      iguana/iguana_unspents.c

12
iguana/iguana_blocks.c

@ -77,7 +77,7 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin
//getchar();
return(0);
}
while ( coin->blockdepth != 0 )
while ( coin->blockdepth > 0 )
{
sleep(1);
printf("%s >>>>>>>>>> OK only if rare %s blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth);
@ -88,8 +88,9 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin
HASH_FIND(hh,coin->blocks.hash,&hash2,sizeof(hash2),block);
if ( block != 0 )
{
coin->blockdepth--;
while ( coin->blockdepth != 0 )
if ( coin->blockdepth > 0 )
coin->blockdepth--;
while ( coin->blockdepth > 0 )
{
sleep(1);
printf(" %s >>>>>>>>>> OK only if rare %s match blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth);
@ -124,8 +125,9 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin
}
portable_mutex_unlock(&coin->blocks_mutex);
}
coin->blockdepth--;
while ( coin->blockdepth != 0 )
if ( coin->blockdepth > 0 )
coin->blockdepth--;
while ( coin->blockdepth > 0 )
{
sleep(1);
printf("%s >>>>>>>>>> OK only if rare %s create blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth);

2
iguana/iguana_unspents.c

@ -2305,7 +2305,7 @@ int32_t iguana_bundlevalidate(struct iguana_info *coin,struct iguana_bundle *bp,
static int32_t totalerrs,totalvalidated;
FILE *fp; char fname[1024]; uint8_t *blockspace; uint32_t now = (uint32_t)time(NULL);
int32_t i,max,len,errs = 0; struct sha256_vstate vstate; bits256 validatehash; int64_t total = 0;
if ( bp->ramchain.from_ro != 0 )
if ( bp->ramchain.from_ro != 0 || bp == coin->current )
{
bp->validated = (uint32_t)time(NULL);
return(bp->n);

Loading…
Cancel
Save