diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 5aca82500..5bc54be54 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -1851,10 +1851,13 @@ int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,str char str[65]; printf("null prevblock error at ht.%d patch.(%s)\n",bp->bundleheight+i,bits256_str(str,bp->hashes[i-1])); if ( i > 0 ) block->RO.prev_block = bp->hashes[i-1]; - block->queued = 0; - block->fpipbits = 0; - bp->issued[i] = 0; - return(-1); + else + { + block->queued = 0; + block->fpipbits = 0; + bp->issued[i] = 0; + return(-1); + } } } else printf("error getting block (%d:%d) %p vs %p\n",bp->hdrsi,i,block,iguana_blockfind(coin,bp->hashes[i])); } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index fa7bfdd80..de8623fb9 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -444,8 +444,8 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct if ( iguana_allhashcmp(coin,bp,blockhashes,coin->chain->bundlesize) > 0 ) { bp->hdrtime = (uint32_t)time(NULL); - iguana_blockQ(coin,bp,0,blockhashes[0],0); iguana_blockQ(coin,bp,1,blockhashes[1],0); + iguana_blockQ(coin,bp,0,blockhashes[0],0); iguana_blockQ(coin,bp,coin->chain->bundlesize-1,blockhashes[coin->chain->bundlesize],0); if ( i == coin->chain->bundlesize ) iguana_blockQ(coin,0,-1,blockhashes[coin->chain->bundlesize],0);