diff --git a/lnwire/message.go b/lnwire/message.go index 634f78ab3..0f28a2465 100644 --- a/lnwire/message.go +++ b/lnwire/message.go @@ -190,6 +190,14 @@ type Message interface { MsgType() MessageType } +// LinkUpdater is an interface implemented by most messages in BOLT 2 that are +// allowed to update the channel state. +type LinkUpdater interface { + // TargetChanID returns the channel id of the link for which this + // message is intended. + TargetChanID() ChannelID +} + // makeEmptyMessage creates a new empty message of the proper concrete type // based on the passed message type. func makeEmptyMessage(msgType MessageType) (Message, error) { diff --git a/peer/brontide.go b/peer/brontide.go index 696ad8610..189fb1660 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -1750,7 +1750,7 @@ out: // will consider them as link updates and send them to // chanStream. These messages will be queued inside chanStream // if the channel is not active yet. - case LinkUpdater: + case lnwire.LinkUpdater: targetChan = msg.TargetChanID() isLinkUpdate = p.hasChannel(targetChan) diff --git a/peer/interfaces.go b/peer/interfaces.go index 562d89723..4f4619fef 100644 --- a/peer/interfaces.go +++ b/peer/interfaces.go @@ -34,14 +34,6 @@ type messageSwitch interface { error) } -// LinkUpdater is an interface implemented by most messages in BOLT 2 that are -// allowed to update the channel state. -type LinkUpdater interface { - // TargetChanID returns the channel id of the link for which this message - // is intended. - TargetChanID() lnwire.ChannelID -} - // MessageConn is an interface implemented by anything that delivers // an lnwire.Message using a net.Conn interface. type MessageConn interface {