fundingmanager+lnd: remove no longer needed FindPeer and SendToPeer
callbacks The FindPeer and SendToPeer callbacks are no longer needed within the fundingManager due to the previous commit allowing us to send messages to peers directly.
This commit is contained in:
parent
9cedef9245
commit
38e01b259f
@ -264,11 +264,6 @@ type fundingConfig struct {
|
|||||||
// to the greater network.
|
// to the greater network.
|
||||||
SendAnnouncement func(msg lnwire.Message) error
|
SendAnnouncement func(msg lnwire.Message) error
|
||||||
|
|
||||||
// SendToPeer allows the FundingManager to send messages to the peer
|
|
||||||
// node during the multiple steps involved in the creation of the
|
|
||||||
// channel's funding transaction and initial commitment transaction.
|
|
||||||
SendToPeer func(target *btcec.PublicKey, msgs ...lnwire.Message) error
|
|
||||||
|
|
||||||
// NotifyWhenOnline allows the FundingManager to register with a
|
// NotifyWhenOnline allows the FundingManager to register with a
|
||||||
// subsystem that will notify it when the peer comes online. This is
|
// subsystem that will notify it when the peer comes online. This is
|
||||||
// used when sending the fundingLocked message, since it MUST be
|
// used when sending the fundingLocked message, since it MUST be
|
||||||
@ -277,11 +272,6 @@ type fundingConfig struct {
|
|||||||
// NOTE: The peerChan channel must be buffered.
|
// NOTE: The peerChan channel must be buffered.
|
||||||
NotifyWhenOnline func(peer *btcec.PublicKey, peerChan chan<- lnpeer.Peer)
|
NotifyWhenOnline func(peer *btcec.PublicKey, peerChan chan<- lnpeer.Peer)
|
||||||
|
|
||||||
// FindPeer searches the list of peers connected to the node so that
|
|
||||||
// the FundingManager can notify other daemon subsystems as necessary
|
|
||||||
// during the funding process.
|
|
||||||
FindPeer func(peerKey *btcec.PublicKey) (*peer, error)
|
|
||||||
|
|
||||||
// FindChannel queries the database for the channel with the given
|
// FindChannel queries the database for the channel with the given
|
||||||
// channel ID.
|
// channel ID.
|
||||||
FindChannel func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error)
|
FindChannel func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error)
|
||||||
|
2
lnd.go
2
lnd.go
@ -360,9 +360,7 @@ func lndMain() error {
|
|||||||
idPrivKey.PubKey())
|
idPrivKey.PubKey())
|
||||||
return <-errChan
|
return <-errChan
|
||||||
},
|
},
|
||||||
SendToPeer: server.SendToPeer,
|
|
||||||
NotifyWhenOnline: server.NotifyWhenOnline,
|
NotifyWhenOnline: server.NotifyWhenOnline,
|
||||||
FindPeer: server.FindPeer,
|
|
||||||
TempChanIDSeed: chanIDSeed,
|
TempChanIDSeed: chanIDSeed,
|
||||||
FindChannel: func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error) {
|
FindChannel: func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error) {
|
||||||
dbChannels, err := chanDB.FetchAllChannels()
|
dbChannels, err := chanDB.FetchAllChannels()
|
||||||
|
Loading…
Reference in New Issue
Block a user