From 59700892b713f03105099f76d50c0df84026ae6b Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Sun, 3 Mar 2024 11:59:57 -0800 Subject: [PATCH] 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. --- lnwire/message.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lnwire/message.go b/lnwire/message.go index 0f28a2465..bcee9f86d 100644 --- a/lnwire/message.go +++ b/lnwire/message.go @@ -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