fix panic for empty node addresses

This commit is contained in:
Sergey Cherepanov 2023-04-21 16:04:30 +02:00
parent e94e2bcf45
commit a57fb52b63
No known key found for this signature in database
GPG Key ID: 87F8EDE8FBDF637C

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
}