aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-09 05:18:23 +0800
committerobscuren <geffobscura@gmail.com>2015-01-09 05:18:23 +0800
commit26f066f0c7570bcca43299721c2b7a1a70186ee3 (patch)
tree1254867236de41cdc31ab9fc38734d8a331090b9 /eth
parent4a0ade4788b0e8d53c6b0eabaf9652643b6a073a (diff)
downloaddexon-26f066f0c7570bcca43299721c2b7a1a70186ee3.tar.gz
dexon-26f066f0c7570bcca43299721c2b7a1a70186ee3.tar.zst
dexon-26f066f0c7570bcca43299721c2b7a1a70186ee3.zip
just enable by default
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 02d3dc942..ad0486309 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -134,24 +134,20 @@ func New(config *Config) (*Ethereum, error) {
eth.blockPool = NewBlockPool(hasBlock, insertChain, ezp.Verify)
ethProto := EthProtocol(eth.txPool, eth.chainManager, eth.blockPool)
- protocols := []p2p.Protocol{ethProto}
-
- if config.Shh {
- eth.whisper = whisper.New()
- protocols = append(protocols, eth.whisper.Protocol())
- }
+ protocols := []p2p.Protocol{ethProto, eth.whisper.Protocol()}
nat, err := p2p.ParseNAT(config.NATType, config.PMPGateway)
if err != nil {
return nil, err
}
+ fmt.Println(nat)
eth.net = &p2p.Server{
Identity: clientId,
MaxPeers: config.MaxPeers,
Protocols: protocols,
Blacklist: eth.blacklist,
- NAT: nat,
+ NAT: p2p.UPNP(),
NoDial: !config.Dial,
}