netann: one append instead of appends in a loop

This commit is contained in:
Andras Banki-Horvath 2020-04-09 20:51:55 +02:00
parent f3f482d9f9
commit 28c2ef12b2

@ -225,9 +225,7 @@ func (g *mockGraph) chans() []*channeldb.OpenChannel {
defer g.mu.Unlock()
channels := make([]*channeldb.OpenChannel, 0, len(g.channels))
for _, channel := range g.channels {
channels = append(channels, channel)
}
channels = append(channels, g.channels...)
return channels
}