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:
1 file changed
+2
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user