|
|
@ -694,7 +694,7 @@ void iguana_checklongestchain(struct iguana_info *coin,struct iguana_bundle *bp, |
|
|
|
int32_t i; struct iguana_peer *addr; |
|
|
|
if ( num > 3 && num < bp->n ) |
|
|
|
{ |
|
|
|
if ( coin->longestchain > bp->bundleheight+num+3 ) |
|
|
|
if ( coin->longestchain > bp->bundleheight+num+coin->chain->minconfirms ) |
|
|
|
{ |
|
|
|
printf("strange.%d suspicious longestchain.%d vs [%d:%d] %d bp->n %d\n",coin->longestchain_strange,coin->longestchain,bp->hdrsi,num,bp->bundleheight+num,bp->n); |
|
|
|
if ( coin->longestchain_strange++ > 10 ) |
|
|
@ -905,6 +905,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct |
|
|
|
struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana_peer *addr,struct iguana_bundlereq *req,struct iguana_block *origblock,int32_t numtx,int32_t datalen,int32_t recvlen,int32_t *newhwmp) |
|
|
|
{ |
|
|
|
struct iguana_bundle *bp=0,*prev; int32_t numsaved=0,bundlei = -2; struct iguana_block *block,*tmpblock; char str[65]; bits256 hash2; |
|
|
|
iguana_blockQ("prev",coin,0,-1,origblock->RO.prev_block,1); |
|
|
|
if ( (bp= iguana_bundleset(coin,&block,&bundlei,origblock)) != 0 && bp == coin->current && block != 0 && bp->speculative != 0 && bundlei >= 0 ) |
|
|
|
{ |
|
|
|
if ( bp->speculative != 0 && bp->numspec <= bundlei ) |
|
|
|