From c69200a9c8462f858ea3724a1ead30780f8e7bf1 Mon Sep 17 00:00:00 2001
From: jl777 <jameslee777@yahoo.com>
Date: Sat, 26 Mar 2016 22:41:44 -0300
Subject: [PATCH] test

---
 iguana/iguana_blocks.c  | 2 +-
 iguana/iguana_bundles.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/iguana/iguana_blocks.c b/iguana/iguana_blocks.c
index 64ceb9036..208dc9dde 100755
--- a/iguana/iguana_blocks.c
+++ b/iguana/iguana_blocks.c
@@ -274,7 +274,7 @@ struct iguana_block *_iguana_chainlink(struct iguana_info *coin,struct iguana_bl
     if ( newblock == 0 )
         return(0);
     hwmchain = &coin->blocks.hwmchain;
-    if ( hwmchain->height > 0 && ((bp= coin->current) == 0 || hwmchain->height/coin->chain->bundlesize >= bp->hdrsi || hwmchain->height > coin->longestchain-bp->n) )
+    if ( hwmchain->height > 0 && ((bp= coin->current) == 0 || hwmchain->height/coin->chain->bundlesize >= bp->hdrsi+0*bp->isRT) )
         return(0);
     if ( (block= iguana_blockfind(coin,newblock->RO.hash2)) != 0 )
     {
diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c
index a5c9664c0..8d50dd75b 100755
--- a/iguana/iguana_bundles.c
+++ b/iguana/iguana_bundles.c
@@ -810,7 +810,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
     for (i=0; i<bp->hdrsi; i++)
         if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc
 #ifdef IGUANA_SERIALIZE_SPENDVECTORGEN
-            || prevbp->utxofinish <= 1 
+            || (i < bp->hdrsi-8 && prevbp->utxofinish <= 1)
 #endif
            )
             break;