lnd: one append instead of appends in a loop

This commit is contained in:
Andras Banki-Horvath committed 2020-04-24 19:15:08 +02:00
1 parent 63419c1870
commit ed595adf59
1 file changed
+2 -3
+2 -3
View File
@@ -598,10 +598,9 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
if err != nil {
return nil, err
}
selfAddrs := make([]net.Addr, 0, len(externalIPs))
for _, ip := range externalIPs {
selfAddrs = append(selfAddrs, ip)
}
selfAddrs = append(selfAddrs, externalIPs...)
chanGraph := chanDB.ChannelGraph()