better address generation

parent 94de6055
...@@ -64,7 +64,7 @@ func makeAddr(n uint32, wan bool) ma.Multiaddr { ...@@ -64,7 +64,7 @@ func makeAddr(n uint32, wan bool) ma.Multiaddr {
ip = append(net.IP{}, lanPrefix...) ip = append(net.IP{}, lanPrefix...)
} }
binary.LittleEndian.PutUint32(ip[4:], n) binary.LittleEndian.PutUint32(ip[12:], n)
addr, _ := ma.NewMultiaddr(fmt.Sprintf("/ip6/%s/tcp/4242", ip)) addr, _ := ma.NewMultiaddr(fmt.Sprintf("/ip6/%s/tcp/4242", ip))
return addr return addr
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment