From a310b3f7f2d0be42cb779eab7ffbcf6292158dac Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 8 Apr 2016 03:52:35 -0500 Subject: [PATCH] test --- iguana/iguana_blocks.c | 4 ++-- iguana/iguana_recv.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_blocks.c b/iguana/iguana_blocks.c index 3e078de83..4e3326cbc 100755 --- a/iguana/iguana_blocks.c +++ b/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 ) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index c6d7b079e..c10753623 100755 --- a/iguana/iguana_recv.c +++ b/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");