aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-01-09 14:21:47 +0800
committerzelig <viktor.tron@gmail.com>2015-01-09 14:21:47 +0800
commitb3161f5803fdab9531c611659b7827ff1a2699dd (patch)
tree8e990b73858c4222d16a33c55119bf3ee56e2068 /eth
parent5a9952c7b47f20451feea1158286450e08b85551 (diff)
parent26f066f0c7570bcca43299721c2b7a1a70186ee3 (diff)
downloaddexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar.gz
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar.bz2
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar.lz
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar.xz
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.tar.zst
dexon-b3161f5803fdab9531c611659b7827ff1a2699dd.zip
Merge remote-tracking branch 'upstream/develop' into develop
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,
}