lnwire: make LinkUpdater a subclass of Message
Conceptually, all messages that are capable of identifying the channel_id on which they operate are themselves messages. Here we codify this.
This commit is contained in:
1 parent
f5f0286e34
commit
59700892b7
1 file changed
+5
@@ -193,6 +193,11 @@ type Message interface {
|
||||
// LinkUpdater is an interface implemented by most messages in BOLT 2 that are
|
||||
// allowed to update the channel state.
|
||||
type LinkUpdater interface {
|
||||
// All LinkUpdater messages are messages and so we embed the interface
|
||||
// so that we can treat it as a message if all we know about it is that
|
||||
// it is a LinkUpdater message.
|
||||
Message
|
||||
|
||||
// TargetChanID returns the channel id of the link for which this
|
||||
// message is intended.
|
||||
TargetChanID() ChannelID
|
||||
|
||||
Reference in new issue
Block a user