htlcswitch_/test_utils: init OpenChannels w/ Packager
This commit is contained in:
parent
970006ff2a
commit
6a88ff940a
@ -5,16 +5,13 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"math/big"
|
||||||
|
"net"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"math/big"
|
|
||||||
|
|
||||||
"net"
|
|
||||||
|
|
||||||
"github.com/btcsuite/fastsha256"
|
"github.com/btcsuite/fastsha256"
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lightning-onion"
|
"github.com/lightningnetwork/lightning-onion"
|
||||||
@ -266,6 +263,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
|||||||
RemoteCommitment: aliceCommit,
|
RemoteCommitment: aliceCommit,
|
||||||
ShortChanID: chanID,
|
ShortChanID: chanID,
|
||||||
Db: dbAlice,
|
Db: dbAlice,
|
||||||
|
Packager: channeldb.NewChannelPackager(chanID),
|
||||||
}
|
}
|
||||||
|
|
||||||
bobChannelState := &channeldb.OpenChannel{
|
bobChannelState := &channeldb.OpenChannel{
|
||||||
@ -283,6 +281,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
|||||||
RemoteCommitment: bobCommit,
|
RemoteCommitment: bobCommit,
|
||||||
ShortChanID: chanID,
|
ShortChanID: chanID,
|
||||||
Db: dbBob,
|
Db: dbBob,
|
||||||
|
Packager: channeldb.NewChannelPackager(chanID),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := aliceChannelState.SyncPending(bobAddr, broadcastHeight); err != nil {
|
if err := aliceChannelState.SyncPending(bobAddr, broadcastHeight); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user