From 38e01b259f10ca75ca2cff633dbe31aea75c0226 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Thu, 5 Jul 2018 13:29:55 -0700 Subject: [PATCH] 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. --- fundingmanager.go | 10 ---------- lnd.go | 2 -- 2 files changed, 12 deletions(-) diff --git a/fundingmanager.go b/fundingmanager.go index d09d2b12..7753204d 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -264,11 +264,6 @@ type fundingConfig struct { // to the greater network. 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 // subsystem that will notify it when the peer comes online. This is // used when sending the fundingLocked message, since it MUST be @@ -277,11 +272,6 @@ type fundingConfig struct { // NOTE: The peerChan channel must be buffered. 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 // channel ID. FindChannel func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error) diff --git a/lnd.go b/lnd.go index 142e9f1e..237e2807 100644 --- a/lnd.go +++ b/lnd.go @@ -360,9 +360,7 @@ func lndMain() error { idPrivKey.PubKey()) return <-errChan }, - SendToPeer: server.SendToPeer, NotifyWhenOnline: server.NotifyWhenOnline, - FindPeer: server.FindPeer, TempChanIDSeed: chanIDSeed, FindChannel: func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error) { dbChannels, err := chanDB.FetchAllChannels()