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:
Wilmer Paulino 2018-07-05 13:29:55 -07:00
parent 9cedef9245
commit 38e01b259f
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
2 changed files with 0 additions and 12 deletions

@ -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)

2
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()