mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-05 04:54:59 +02:00
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:
@ -7,6 +7,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
prand "math/rand"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@ -102,7 +103,7 @@ func CreateTestChannels() (*LightningChannel, *LightningChannel, func(), error)
|
|||||||
|
|
||||||
prevOut := &wire.OutPoint{
|
prevOut := &wire.OutPoint{
|
||||||
Hash: chainhash.Hash(testHdSeed),
|
Hash: chainhash.Hash(testHdSeed),
|
||||||
Index: 0,
|
Index: prand.Uint32(),
|
||||||
}
|
}
|
||||||
fundingTxIn := wire.NewTxIn(prevOut, nil, nil)
|
fundingTxIn := wire.NewTxIn(prevOut, nil, nil)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user