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

@@ -52,7 +52,7 @@ type mockChannelGraphTimeSeries struct {
annResp chan []lnwire.Message
updateReq chan lnwire.ShortChannelID
updateResp chan []*lnwire.ChannelUpdate
updateResp chan []*lnwire.ChannelUpdate1
}
func newMockChannelGraphTimeSeries(
@@ -74,7 +74,7 @@ func newMockChannelGraphTimeSeries(
annResp: make(chan []lnwire.Message, 1),
updateReq: make(chan lnwire.ShortChannelID, 1),
updateResp: make(chan []*lnwire.ChannelUpdate, 1),
updateResp: make(chan []*lnwire.ChannelUpdate1, 1),
}
}
@@ -149,7 +149,7 @@ func (m *mockChannelGraphTimeSeries) FetchChanAnns(chain chainhash.Hash,
return <-m.annResp, nil
}
func (m *mockChannelGraphTimeSeries) FetchChanUpdates(chain chainhash.Hash,
shortChanID lnwire.ShortChannelID) ([]*lnwire.ChannelUpdate, error) {
shortChanID lnwire.ShortChannelID) ([]*lnwire.ChannelUpdate1, error) {
m.updateReq <- shortChanID
@@ -311,7 +311,7 @@ func TestGossipSyncerFilterGossipMsgsAllInMemory(t *testing.T) {
},
},
{
msg: &lnwire.ChannelUpdate{
msg: &lnwire.ChannelUpdate1{
ShortChannelID: lnwire.NewShortChanIDFromInt(10),
Timestamp: unixStamp(5),
},
@@ -323,7 +323,7 @@ func TestGossipSyncerFilterGossipMsgsAllInMemory(t *testing.T) {
},
},
{
msg: &lnwire.ChannelUpdate{
msg: &lnwire.ChannelUpdate1{
ShortChannelID: lnwire.NewShortChanIDFromInt(15),
Timestamp: unixStamp(25002),
},
@@ -335,7 +335,7 @@ func TestGossipSyncerFilterGossipMsgsAllInMemory(t *testing.T) {
},
},
{
msg: &lnwire.ChannelUpdate{
msg: &lnwire.ChannelUpdate1{
ShortChannelID: lnwire.NewShortChanIDFromInt(20),
Timestamp: unixStamp(999999),
},
@@ -369,7 +369,7 @@ func TestGossipSyncerFilterGossipMsgsAllInMemory(t *testing.T) {
}
// If so, then we'll send back the missing update.
chanSeries.updateResp <- []*lnwire.ChannelUpdate{
chanSeries.updateResp <- []*lnwire.ChannelUpdate1{
{
ShortChannelID: lnwire.NewShortChanIDFromInt(25),
Timestamp: unixStamp(5),
@@ -551,7 +551,7 @@ func TestGossipSyncerApplyGossipFilter(t *testing.T) {
// For this first response, we'll send back a proper
// set of messages that should be echoed back.
chanSeries.horizonResp <- []lnwire.Message{
&lnwire.ChannelUpdate{
&lnwire.ChannelUpdate1{
ShortChannelID: lnwire.NewShortChanIDFromInt(25),
Timestamp: unixStamp(5),
},
@@ -709,7 +709,7 @@ func TestGossipSyncerReplyShortChanIDs(t *testing.T) {
&lnwire.ChannelAnnouncement1{
ShortChannelID: lnwire.NewShortChanIDFromInt(20),
},
&lnwire.ChannelUpdate{
&lnwire.ChannelUpdate1{
ShortChannelID: lnwire.NewShortChanIDFromInt(20),
Timestamp: unixStamp(999999),
},