mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
peer: make AddNewChannel take OpenChannel
This commit makes the AddNewChannel expect a OpenChannel instead of a LightningChannel struct. This moves the responsibility for starting the LightningChannel from the fundingmanager to the peer, and we can defer the channel restoration until we know that the channel is not already active.
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ type Peer interface {
|
||||
|
||||
// AddNewChannel adds a new channel to the peer. The channel should fail
|
||||
// to be added if the cancel channel is closed.
|
||||
AddNewChannel(channel *lnwallet.LightningChannel, cancel <-chan struct{}) error
|
||||
AddNewChannel(channel *channeldb.OpenChannel, cancel <-chan struct{}) error
|
||||
|
||||
// WipeChannel removes the channel uniquely identified by its channel
|
||||
// point from all indexes associated with the peer.
|
||||
|
||||
Reference in New Issue
Block a user