aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go3
-rw-r--r--eth/downloader/downloader.go2
-rw-r--r--eth/handler.go3
3 files changed, 7 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 5798e641a..88456e448 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -50,6 +50,7 @@ type Config struct {
LogLevel int
LogJSON string
VmDebug bool
+ NatSpec bool
MaxPeers int
Port string
@@ -144,6 +145,7 @@ type Ethereum struct {
// logger logger.LogSystem
Mining bool
+ NatSpec bool
DataDir string
etherbase common.Address
clientVersion string
@@ -208,6 +210,7 @@ func New(config *Config) (*Ethereum, error) {
clientVersion: config.Name, // TODO should separate from Name
ethVersionId: config.ProtocolVersion,
netVersionId: config.NetworkId,
+ NatSpec: config.NatSpec,
}
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux())
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index addcbcc44..cfc494b2f 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -472,6 +472,8 @@ func (d *Downloader) process() error {
}
break
} else if err != nil {
+ // immediatly unregister the false peer but do not disconnect
+ d.UnregisterPeer(d.activePeer)
// Reset chain completely. This needs much, much improvement.
// instead: check all blocks leading down to this block false block and remove it
blocks = nil
diff --git a/eth/handler.go b/eth/handler.go
index 5c0660d84..622f22132 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -36,6 +36,7 @@ pm.chainman.InsertChain(blocks)
import (
"fmt"
+ "math"
"math/big"
"sync"
@@ -326,7 +327,7 @@ func (pm *ProtocolManager) BroadcastBlock(hash common.Hash, block *types.Block)
}
// Broadcast block to peer set
// XXX due to the current shit state of the network disable the limit
- //peers = peers[:int(math.Sqrt(float64(len(peers))))]
+ peers = peers[:int(math.Sqrt(float64(len(peers))))]
for _, peer := range peers {
peer.sendNewBlock(block)
}