mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
if port is empty string, no listening
This commit is contained in:
parent
4757aa0c2e
commit
d82df7e30f
1 changed files with 9 additions and 6 deletions
|
|
@ -145,11 +145,14 @@ func New(config *Config) (*Ethereum, error) {
|
|||
Identity: clientId,
|
||||
MaxPeers: config.MaxPeers,
|
||||
Protocols: protocols,
|
||||
ListenAddr: ":" + config.Port,
|
||||
Blacklist: eth.blacklist,
|
||||
NAT: nat,
|
||||
}
|
||||
|
||||
if len(config.Port) > 0 {
|
||||
eth.net.ListenAddr = ":" + config.Port
|
||||
}
|
||||
|
||||
return eth, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue