watchtower/wtmock/peer: set local pubkey

This commit is contained in:
Conner Fromknecht
2019-03-15 02:34:00 -07:00
parent 80040d9d96
commit 05e3a7f6c0
2 changed files with 18 additions and 9 deletions

View File

@@ -27,14 +27,17 @@ type MockPeer struct {
}
// NewMockPeer returns a fresh MockPeer.
func NewMockPeer(pk *btcec.PublicKey, addr net.Addr, bufferSize int) *MockPeer {
func NewMockPeer(lpk, rpk *btcec.PublicKey, addr net.Addr,
bufferSize int) *MockPeer {
return &MockPeer{
remotePub: pk,
remotePub: rpk,
remoteAddr: addr,
localAddr: &net.TCPAddr{
IP: net.IP{0x32, 0x31, 0x30, 0x29},
Port: 36723,
},
localPub: lpk,
IncomingMsgs: make(chan []byte, bufferSize),
OutgoingMsgs: make(chan []byte, bufferSize),
Quit: make(chan struct{}),