fix panic for empty node addresses

This commit is contained in:
Sergey Cherepanov 2023-04-21 16:04:30 +02:00 committed by Mikhail Iudin
parent de0cb12354
commit 0d0381cc42
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -85,6 +85,9 @@ func (c *nodeConf) CoordinatorPeers() []string {
func (c *nodeConf) PeerAddresses(peerId string) (addrs []string, ok bool) {
addrs, ok = c.addrs[peerId]
if ok && len(addrs) == 0 {
return nil, false
}
return
}