netann: one append instead of appends in a loop
This commit is contained in:
parent
f3f482d9f9
commit
28c2ef12b2
@ -225,9 +225,7 @@ func (g *mockGraph) chans() []*channeldb.OpenChannel {
|
|||||||
defer g.mu.Unlock()
|
defer g.mu.Unlock()
|
||||||
|
|
||||||
channels := make([]*channeldb.OpenChannel, 0, len(g.channels))
|
channels := make([]*channeldb.OpenChannel, 0, len(g.channels))
|
||||||
for _, channel := range g.channels {
|
channels = append(channels, g.channels...)
|
||||||
channels = append(channels, channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
return channels
|
return channels
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user