multi: rename ChannelUpdate to ChannelUpdate1

In preparation for adding a new ChannelUpdate2 message and a
ChannelUpdate interface, we rename the existing message to
ChannelUpdate1.
This commit is contained in:
Elle Mouton
2024-08-21 08:39:37 +02:00
parent bb44efa21f
commit 60f331edb1
43 changed files with 198 additions and 172 deletions

View File

@@ -1406,9 +1406,11 @@ func (g *GossipSyncer) FilterGossipMsgs(msgs ...msgWithSenders) {
// set of channel announcements and channel updates. This will allow us
// to quickly check if we should forward a chan ann, based on the known
// channel updates for a channel.
chanUpdateIndex := make(map[lnwire.ShortChannelID][]*lnwire.ChannelUpdate)
chanUpdateIndex := make(
map[lnwire.ShortChannelID][]*lnwire.ChannelUpdate1,
)
for _, msg := range msgs {
chanUpdate, ok := msg.msg.(*lnwire.ChannelUpdate)
chanUpdate, ok := msg.msg.(*lnwire.ChannelUpdate1)
if !ok {
continue
}
@@ -1478,7 +1480,7 @@ func (g *GossipSyncer) FilterGossipMsgs(msgs ...msgWithSenders) {
// For each channel update, we'll only send if it the timestamp
// is between our time range.
case *lnwire.ChannelUpdate:
case *lnwire.ChannelUpdate1:
if passesFilter(msg.Timestamp) {
msgsToSend = append(msgsToSend, msg)
}