diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index 08061e4e1..91833e84a 100755 --- a/iguana/iguana_msg.c +++ b/iguana/iguana_msg.c @@ -1057,9 +1057,8 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s free(coinbase_branch); if ( blockchain_branch != 0 ) free(blockchain_branch); - if ( 1 || iguana_gotheadersM(coin,addr,zblocks,n) < 0 ) + if ( iguana_gotheadersM(coin,addr,zblocks,n) < 0 ) myfree(zblocks,(int32_t)(sizeof(struct iguana_zblock) * n)); - //myfree(blocks,sizeof(*blocks) * n); if ( len == recvlen && addr != 0 ) addr->msgcounts.headers++; } else printf("got unexpected n.%d for headers\n",n); diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 2fe3993d0..f9633dcb3 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -1207,7 +1207,7 @@ void iguana_dedicatedloop(struct supernet_info *myinfo,struct iguana_info *coin, vcalc_sha256(0,addr->iphash.bytes,(uint8_t *)&ipbits,sizeof(ipbits)); //char str[65]; printf("start dedicatedloop.%s addrind.%d %s\n",addr->ipaddr,addr->addrind,bits256_str(str,addr->iphash)); //addr->maxfilehash2 = IGUANA_MAXFILEITEMS; - bufsize = IGUANA_MAXPACKETSIZE; + bufsize = IGUANA_MAXPACKETSIZE * 2; if ( addr->blockspace == 0 ) addr->blockspace = mycalloc('r',1,bufsize + 8192); buf = mycalloc('r',1,bufsize);