handle .onion addresses in deserialising addrmanager.

Use the generic function that already handles this.
This commit is contained in:
Owain G. Ainsworth 2013-11-28 18:37:37 +00:00
parent 8968f7dd74
commit 1145fb57ed

View file

@ -595,14 +595,12 @@ func deserialiseNetAddress(addr string) (*btcwire.NetAddress, error) {
if err != nil {
return nil, err
}
ip := net.ParseIP(host)
port, err := strconv.ParseUint(portStr, 10, 16)
if err != nil {
return nil, err
}
na := btcwire.NewNetAddressIPPort(ip, uint16(port),
btcwire.SFNodeNetwork)
return na, nil
return hostToNetAddress(host, uint16(port), btcwire.SFNodeNetwork)
}
// Start begins the core address handler which manages a pool of known