lnwallet/test_utils: make CreateTestChannel return random funding op

Previously it would always be the same, resulting in multiple calls to
the method not being usabel to create more than one set of channels.
This commit is contained in:
Johan T. Halseth 2019-09-06 13:14:39 +02:00
parent 425afd28ea
commit 07a42971bf
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -7,6 +7,7 @@ import (
"encoding/hex"
"io"
"io/ioutil"
prand "math/rand"
"net"
"os"
@ -102,7 +103,7 @@ func CreateTestChannels() (*LightningChannel, *LightningChannel, func(), error)
prevOut := &wire.OutPoint{
Hash: chainhash.Hash(testHdSeed),
Index: 0,
Index: prand.Uint32(),
}
fundingTxIn := wire.NewTxIn(prevOut, nil, nil)