mirror of
https://github.com/btcsuite/btcd.git
synced 2025-03-10 17:26:07 +01:00
handle .onion addresses in deserialising addrmanager.
Use the generic function that already handles this.
This commit is contained in:
parent
8968f7dd74
commit
1145fb57ed
1 changed files with 2 additions and 4 deletions
|
@ -595,14 +595,12 @@ func deserialiseNetAddress(addr string) (*btcwire.NetAddress, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
ip := net.ParseIP(host)
|
|
||||||
port, err := strconv.ParseUint(portStr, 10, 16)
|
port, err := strconv.ParseUint(portStr, 10, 16)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
na := btcwire.NewNetAddressIPPort(ip, uint16(port),
|
|
||||||
btcwire.SFNodeNetwork)
|
return hostToNetAddress(host, uint16(port), btcwire.SFNodeNetwork)
|
||||||
return na, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start begins the core address handler which manages a pool of known
|
// Start begins the core address handler which manages a pool of known
|
||||||
|
|
Loading…
Add table
Reference in a new issue