From 9c72dd9ebaf46c1275ae086e744ad17d173825f4 Mon Sep 17 00:00:00 2001 From: eugene Date: Mon, 16 Nov 2020 20:26:08 -0500 Subject: [PATCH] funding+peer: rename Manager interface to Controller --- funding/interfaces.go | 11 ++++++----- peer/brontide.go | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/funding/interfaces.go b/funding/interfaces.go index 87f3b0a3..8d37840a 100644 --- a/funding/interfaces.go +++ b/funding/interfaces.go @@ -5,16 +5,17 @@ import ( "github.com/lightningnetwork/lnd/lnwire" ) -// Manager is an interface that describes the basic operation of a funding -// manager. It should at a minimum process a subset of lnwire messages that +// Controller is an interface with basic funding flow functions. +// 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. -type Manager interface { +type Controller interface { // ProcessFundingMsg processes a funding message represented by the // lnwire.Message parameter along with the Peer object representing a // connection to the counterparty. ProcessFundingMsg(lnwire.Message, lnpeer.Peer) - // IsPendingChannel is used to determine whether to send an Error message - // to the funding manager or not. + // IsPendingChannel returns whether a particular 32-byte identifier + // represents a pending channel in the Controller implementation. IsPendingChannel([32]byte, lnpeer.Peer) bool } diff --git a/peer/brontide.go b/peer/brontide.go index da96bfa5..3dc92e11 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -273,8 +273,8 @@ type Config struct { FetchLastChanUpdate func(lnwire.ShortChannelID) (*lnwire.ChannelUpdate, error) - // FundingManager is an implementation of the funding.Manager interface. - FundingManager funding.Manager + // FundingManager is an implementation of the funding.Controller interface. + FundingManager funding.Controller // Hodl is used when creating ChannelLinks to specify HodlFlags as // breakpoints in dev builds.