htlcswitch: remove lnrpc dependency

This commits removes an unwanted dependency that prevents
moving parts of rpcserver to a sub server.
This commit is contained in:
Joost Jager
2018-12-20 18:52:27 +01:00
parent 237f2b6d4b
commit 6c027e2bc9
4 changed files with 68 additions and 41 deletions

View File

@@ -17,7 +17,6 @@ import (
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/contractcourt"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/ticker"
@@ -119,7 +118,7 @@ type ChanClose struct {
// Updates is used by request creator to receive the notifications about
// execution of the close channel request.
Updates chan *lnrpc.CloseStatusUpdate
Updates chan interface{}
// Err is used by request creator to receive request execution error.
Err chan error
@@ -1415,11 +1414,11 @@ func (s *Switch) teardownCircuit(pkt *htlcPacket) error {
// then the last parameter should be the ideal fee-per-kw that will be used as
// a starting point for close negotiation.
func (s *Switch) CloseLink(chanPoint *wire.OutPoint, closeType ChannelCloseType,
targetFeePerKw lnwallet.SatPerKWeight) (chan *lnrpc.CloseStatusUpdate,
targetFeePerKw lnwallet.SatPerKWeight) (chan interface{},
chan error) {
// TODO(roasbeef) abstract out the close updates.
updateChan := make(chan *lnrpc.CloseStatusUpdate, 2)
updateChan := make(chan interface{}, 2)
errChan := make(chan error, 1)
command := &ChanClose{