multi: rename ChannelAnnouncement to ChannelAnnouncment1

In preparation for adding the new ChannelAnnouncement2 message along
with a ChannelAnnouncement interface, we rename the existing message to
ChannelAnnouncement1.
This commit is contained in:
Elle Mouton committed 2024-09-18 16:13:17 +02:00
1 parent 05d76b696d
commit bb44efa21f
17 files changed
+55 -54

No files matched your search

+2 -2
View File
@@ -14,14 +14,14 @@ import (
// peer's initial routing table upon connect.
func CreateChanAnnouncement(chanProof *models.ChannelAuthProof,
chanInfo *models.ChannelEdgeInfo,
e1, e2 *models.ChannelEdgePolicy) (*lnwire.ChannelAnnouncement,
e1, e2 *models.ChannelEdgePolicy) (*lnwire.ChannelAnnouncement1,
*lnwire.ChannelUpdate, *lnwire.ChannelUpdate, error) {
// First, using the parameters of the channel, along with the channel
// authentication chanProof, we'll create re-create the original
// authenticated channel announcement.
chanID := lnwire.NewShortChanIDFromInt(chanInfo.ChannelID)
chanAnn := &lnwire.ChannelAnnouncement{
chanAnn := &lnwire.ChannelAnnouncement1{
ShortChannelID: chanID,
NodeID1: chanInfo.NodeKey1Bytes,
NodeID2: chanInfo.NodeKey2Bytes,
+1 -1
View File
@@ -24,7 +24,7 @@ func TestCreateChanAnnouncement(t *testing.T) {
t.Fatalf("unable to encode features: %v", err)
}
expChanAnn := &lnwire.ChannelAnnouncement{
expChanAnn := &lnwire.ChannelAnnouncement1{
ChainHash: chainhash.Hash{0x1},
ShortChannelID: lnwire.ShortChannelID{BlockHeight: 1},
NodeID1: key,
+1 -1
View File
@@ -20,7 +20,7 @@ func SignAnnouncement(signer lnwallet.MessageSigner, keyLoc keychain.KeyLocator,
)
switch m := msg.(type) {
case *lnwire.ChannelAnnouncement:
case *lnwire.ChannelAnnouncement1:
data, err = m.DataToSign()
case *lnwire.ChannelUpdate:
data, err = m.DataToSign()