funding+peer: rename Manager interface to Controller

This commit is contained in:
eugene committed 2020-12-17 09:36:34 -05:00
1 parent caa0f5da6a
commit 9c72dd9eba
2 files changed
+8 -7

No files matched your search

+6 -5
View File
@@ -5,16 +5,17 @@ import (
"github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/lnwire"
) )
// Manager is an interface that describes the basic operation of a funding // Controller is an interface with basic funding flow functions.
// manager. It should at a minimum process a subset of lnwire messages that // It describes the basic functionality of a funding manager.
// It should at a minimum process a subset of lnwire messages that
// are denoted as funding messages. // are denoted as funding messages.
type Manager interface { type Controller interface {
// ProcessFundingMsg processes a funding message represented by the // ProcessFundingMsg processes a funding message represented by the
// lnwire.Message parameter along with the Peer object representing a // lnwire.Message parameter along with the Peer object representing a
// connection to the counterparty. // connection to the counterparty.
ProcessFundingMsg(lnwire.Message, lnpeer.Peer) ProcessFundingMsg(lnwire.Message, lnpeer.Peer)
// IsPendingChannel is used to determine whether to send an Error message // IsPendingChannel returns whether a particular 32-byte identifier
// to the funding manager or not. // represents a pending channel in the Controller implementation.
IsPendingChannel([32]byte, lnpeer.Peer) bool IsPendingChannel([32]byte, lnpeer.Peer) bool
} }
+2 -2
View File
@@ -273,8 +273,8 @@ type Config struct {
FetchLastChanUpdate func(lnwire.ShortChannelID) (*lnwire.ChannelUpdate, FetchLastChanUpdate func(lnwire.ShortChannelID) (*lnwire.ChannelUpdate,
error) error)
// FundingManager is an implementation of the funding.Manager interface. // FundingManager is an implementation of the funding.Controller interface.
FundingManager funding.Manager FundingManager funding.Controller
// Hodl is used when creating ChannelLinks to specify HodlFlags as // Hodl is used when creating ChannelLinks to specify HodlFlags as
// breakpoints in dev builds. // breakpoints in dev builds.