Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
a310b3f7f2
  1. 4
      iguana/iguana_blocks.c
  2. 3
      iguana/iguana_recv.c

4
iguana/iguana_blocks.c

@ -308,9 +308,9 @@ int32_t iguana_walkchain(struct iguana_info *coin)
}
else if ( block->height >= 0 && block->height != height )
printf("walkchain height mismatch %d vs %d\n",block->height,height);
if ( bits256_cmp(iguana_blockhash(coin,height),block->RO.hash2) != 0 )
if ( bits256_nonz(iguana_blockhash(coin,height)) != 0 && bits256_cmp(iguana_blockhash(coin,height),block->RO.hash2) != 0 )
{
printf("walk error blockhash error at %d %s\n",height,bits256_str(str,block->RO.hash2));
printf("walk error blockhash error at %d %s\n",height,bits256_str(str,iguana_blockhash(coin,height)));
break;
}
else if ( bits256_cmp(bp->hashes[bundlei],block->RO.hash2) != 0 )

3
iguana/iguana_recv.c

@ -1505,17 +1505,18 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded
coin->RTramchain_busy = 1;
flag += iguana_processrecvQ(coin,&newhwm);
flag += iguana_reqhdrs(coin);
flag += iguana_reqblocks(coin);
if ( coin->RTheight != 0 )
{
if ( time(NULL) > coin->laststats+5 )
{
flag += iguana_reqblocks(coin);
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG);
coin->laststats = (uint32_t)time(NULL);
}
}
else
{
flag += iguana_reqblocks(coin);
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG);
}
//printf("call _iguana_chainlink\n");

Loading…
Cancel
Save