lnd: one append instead of appends in a loop

This commit is contained in:
Andras Banki-Horvath 2020-04-14 17:55:26 +02:00
parent 63419c1870
commit ed595adf59

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()