From 6171ab49876d0d0684b5870d55f2bb3981e5d9ab Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 10 Sep 2016 15:07:01 -0300 Subject: [PATCH] test --- iguana/iguana_recv.c | 13 +++++++++---- includes/iguana_globals.h | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index bd1c5e5b1..4009e0f9e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -767,10 +767,15 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru } else // new bundle case, but bad context to extend { - origtxdata->zblock.issued = 0; - origtxdata->zblock.RO.recvlen = 0; - printf("gotblockM2: error finding block %s\n",bits256_str(str,origtxdata->zblock.RO.hash2)); - return; + bits256 zero; + memset(zero.bytes,0,sizeof(zero)); + if ( (bp= iguana_bundlecreate(coin,&bundlei,bp->bundleheight + coin->chain->bundlesize,origtxdata->zblock.RO.hash2,zero,0)) == 0 ) + { + origtxdata->zblock.issued = 0; + origtxdata->zblock.RO.recvlen = 0; + printf("gotblockM2: error finding block %s\n",bits256_str(str,origtxdata->zblock.RO.hash2)); + return; + } else printf("getblockM autoextended.[%d]\n",bp->hdrsi); } } if ( bp == 0 ) diff --git a/includes/iguana_globals.h b/includes/iguana_globals.h index 3c20f63a3..b4982dacd 100755 --- a/includes/iguana_globals.h +++ b/includes/iguana_globals.h @@ -42,9 +42,9 @@ char GLOBAL_GENESISDIR[512] = "genesis"; char GLOBAL_VALIDATEDIR[512] = "DB/purgeable"; char GLOBAL_CONFSDIR[512] = "confs"; #ifdef __linux -int32_t IGUANA_NUMHELPERS = 8; +int32_t IGUANA_NUMHELPERS = 4; #else -int32_t IGUANA_NUMHELPERS = 2; +int32_t IGUANA_NUMHELPERS = 1; #endif #endif