From 78f9bf2b7df54fd7949ce1acd87e160268852de6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Sep 2016 11:55:12 -0300 Subject: [PATCH] test --- iguana/iguana_ramchain.c | 5 ++--- iguana/iguana_recv.c | 12 +----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index e34b3c4c4..627efeefe 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -110,11 +110,10 @@ int32_t iguana_peerfname(struct iguana_info *coin,int32_t *hdrsip,char *dirname, bp = 0, bundlei = -2; if ( bits256_nonz(prevhash2) == 0 || (bp= iguana_bundlefind(coin,&bp,&bundlei,prevhash2)) == 0 || bundlei >= coin->chain->bundlesize-1 ) { - //if ( 0 && dispflag != 0 ) + if ( 0 && dispflag != 0 ) printf("iguana_peerfname %s error finding.(%s) spec.%p bp.%p\n",coin->symbol,bits256_str(str,hash2),bp!=0?bp->speculative:0,bp); return(-2); - } - else bundlei++; + } else bundlei++; } hash2 = bp->hashes[0], *hdrsip = bp->hdrsi; subdir = bp->bundleheight / IGUANA_SUBDIRDIVISOR; diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 1d09636b1..1d14f872d 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -1020,16 +1020,6 @@ void iguana_bundlespeculate(struct iguana_info *coin,struct iguana_bundle *bp,in //fprintf(stderr,"Afound block -> %d %d hdr.%s\n",bp->bundleheight,coin->longestchain-coin->chain->bundlesize,str); queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(str),1); } - /*else if ( bp->speculative != 0 && bundlei < bp->numspec && memcmp(hash2.bytes,bp->speculative[bundlei].bytes,sizeof(hash2)) == 0 ) - { - bundlei += offset; - if ( bundlei < bp->n && bundlei < bp->numspec && time(NULL) > bp->issued[bundlei]+30 ) - { - char str[65]; printf("speculative req[%d] %s\n",bundlei,bits256_str(str,bp->speculative[bundlei])); - iguana_blockQ("speculate",coin,0,-1,bp->speculative[bundlei],0); - bp->issued[bundlei] = (uint32_t)time(NULL); - } - } */ //else printf("speculative.%p %d vs %d cmp.%d\n",bp->speculative,bundlei,bp->numspec,bp->speculative!=0?memcmp(hash2.bytes,bp->speculative[bundlei].bytes,sizeof(hash2)):-1);*/ } int32_t iguana_bundlehashadd(struct iguana_info *coin,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block) @@ -1473,7 +1463,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct supernet_info *myinfo,str } } } - if ( strcmp("BTC",coin->symbol) != 0 && (bp->speculative == 0 || num > bp->numspec) && bp->emitfinish == 0 ) + if ( strcmp("BTCD",coin->symbol) == 0 && (bp->speculative == 0 || num > bp->numspec) && bp->emitfinish == 0 ) { //printf("FOUND speculative.%s BLOCKHASHES[%d] ht.%d\n",bits256_str(str,blockhashes[1]),num,bp->bundleheight); if ( bp->speculative == 0 )