lnd: use persisted addrs if not set in config

This commit is contained in:
Abdullahi Yunus committed 2025-09-24 10:51:19 +01:00
1 parent 783c887824
commit cf287e9693
1 file changed
+6
+6
View File
@@ -5595,6 +5595,12 @@ func (s *server) setSelfNode(ctx context.Context, nodePub route.Vertex,
alias = srcNode.Alias
}
// If the `externalip` is not specified in the config, it means
// `addrs` will be empty, we'll use the source node's addresses.
if len(s.cfg.ExternalIPs) == 0 {
addrs = srcNode.Addresses
}
case errors.Is(err, graphdb.ErrSourceNodeNotSet):
// If an alias is not specified in the config, we'll use the
// default, which is the first 10 bytes of the serialized