From 75a836bc49f00554e5cd6d825b25836edd0ec25a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 12 Mar 2016 23:24:15 -0300 Subject: [PATCH] test --- iguana/iguana_recv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 8f9684f79..d80927c73 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -795,9 +795,11 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana } if ( block != 0 ) { - if ( 0 && bits256_nonz(block->RO.prev_block) > 0 ) + if ( bp != 0 && bundlei > 0 && bits256_nonz(block->RO.prev_block) > 0 && bits256_nonz(bp->hashes[bundlei-1]) == 0 ) { - iguana_blockQ(coin,bundlei > 0 ? bp : 0,bundlei-1,block->RO.prev_block,0); + printf("backfill [%d:%d]\n",bp->hdrsi,bundlei-1); + bp->hashes[bundlei-1] = block->RO.prev_block; + //iguana_blockQ(coin,bundlei > 0 ? bp : 0,bundlei-1,block->RO.prev_block,0); //printf("recv autoreq prev [%d:%d]\n",bp!=0?bp->hdrsi:-1,bundlei); } //block->RO.recvlen = recvlen;