Fix add peer loop, add peers at startup

This commit is contained in:
Neil Alexander 2019-09-02 19:26:58 +01:00
parent 8057d80ec9
commit 9ea1d35a14
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 47 additions and 82 deletions

View file

@ -180,6 +180,15 @@ func main() {
} else {
logger.Errorln("Unable to get Listener:", err)
}
// Add our peers
for _, addr := range n.config.Peers {
n.core.AddPeer(addr, "")
}
for sintf, addrs := range n.config.InterfacePeers {
for _, addr := range addrs {
n.core.AddPeer(addr, sintf)
}
}
// Make some nice output that tells us what our IPv6 address and subnet are.
// This is just logged to stdout for the user.
address := n.core.Address()