diff --git a/lnwire/lnwire_test.go b/lnwire/lnwire_test.go index f1311c62..8a1e82f6 100644 --- a/lnwire/lnwire_test.go +++ b/lnwire/lnwire_test.go @@ -668,11 +668,9 @@ func TestLightningWireProtocol(t *testing.T) { numChanIDs := rand.Int31n(5000) - req.ShortChanIDs = make([]ShortChannelID, numChanIDs) for i := int32(0); i < numChanIDs; i++ { - req.ShortChanIDs[i] = NewShortChanIDFromInt( - uint64(r.Int63()), - ) + req.ShortChanIDs = append(req.ShortChanIDs, + NewShortChanIDFromInt(uint64(r.Int63()))) } v[0] = reflect.ValueOf(req)