lnwire: update tests to new wire.TxIn API
Syncing to match upstream btcd segwit branch.
This commit is contained in:
parent
1a617fcccb
commit
8dc284db02
@ -3,12 +3,13 @@ package lnwire
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"github.com/roasbeef/btcd/btcec"
|
|
||||||
"github.com/roasbeef/btcd/txscript"
|
|
||||||
"github.com/roasbeef/btcd/wire"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/roasbeef/btcd/btcec"
|
||||||
|
"github.com/roasbeef/btcd/txscript"
|
||||||
|
"github.com/roasbeef/btcd/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Common variables and functions for the message tests
|
// Common variables and functions for the message tests
|
||||||
@ -16,7 +17,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
// For debugging, writes to /dev/shm/
|
// For debugging, writes to /dev/shm/
|
||||||
// Maybe in the future do it if you do "go test -v"
|
// Maybe in the future do it if you do "go test -v"
|
||||||
WRITE_FILE = true
|
WRITE_FILE = false
|
||||||
filename = "/dev/shm/serialized.raw"
|
filename = "/dev/shm/serialized.raw"
|
||||||
|
|
||||||
// preimage: 9a2cbd088763db88dd8ba79e5726daa6aba4aa7e
|
// preimage: 9a2cbd088763db88dd8ba79e5726daa6aba4aa7e
|
||||||
@ -57,7 +58,7 @@ var (
|
|||||||
shaHash2, _ = wire.NewShaHash(shaHash2Bytes)
|
shaHash2, _ = wire.NewShaHash(shaHash2Bytes)
|
||||||
outpoint2 = wire.NewOutPoint(shaHash2, 1)
|
outpoint2 = wire.NewOutPoint(shaHash2, 1)
|
||||||
// create inputs from outpoint1 and outpoint2
|
// create inputs from outpoint1 and outpoint2
|
||||||
inputs = []*wire.TxIn{wire.NewTxIn(outpoint1, nil), wire.NewTxIn(outpoint2, nil)}
|
inputs = []*wire.TxIn{wire.NewTxIn(outpoint1, nil, nil), wire.NewTxIn(outpoint2, nil, nil)}
|
||||||
|
|
||||||
// Commitment Signature
|
// Commitment Signature
|
||||||
tx = wire.NewMsgTx()
|
tx = wire.NewMsgTx()
|
||||||
|
Loading…
Reference in New Issue
Block a user