Merge pull request #9175 from ellemouton/g175UpdateMessageStructure

lnwire+netann: update structure of g175 messages to be pure TLV
This commit is contained in:
Elle authored and GitHub committed 2025-09-22 10:04:44 +02:00
commit 055fb436e1
18 files changed
+1460 -268

No files matched your search

+7 -2
View File
@@ -18,6 +18,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/davecgh/go-spew/spew"
@@ -620,6 +621,7 @@ func createUpdateAnnouncement(blockHeight uint32,
htlcMinMsat := lnwire.MilliSatoshi(100)
a := &lnwire.ChannelUpdate1{
ChainHash: *chaincfg.MainNetParams.GenesisHash,
ShortChannelID: lnwire.ShortChannelID{
BlockHeight: blockHeight,
},
@@ -772,6 +774,7 @@ func (ctx *testCtx) createAnnouncementWithoutProof(blockHeight uint32,
}
a := &lnwire.ChannelAnnouncement1{
ChainHash: *chaincfg.MainNetParams.GenesisHash,
ShortChannelID: lnwire.ShortChannelID{
BlockHeight: blockHeight,
TxIndex: 0,
@@ -938,8 +941,9 @@ func createTestCtx(t *testing.T, startHeight uint32, isChanPeer bool) (
}
gossiper := New(Config{
ChainIO: chain,
Notifier: notifier,
ChainIO: chain,
ChainParams: &chaincfg.MainNetParams,
Notifier: notifier,
Broadcast: func(senders map[route.Vertex]struct{},
msgs ...lnwire.Message) error {
@@ -1669,6 +1673,7 @@ func TestSignatureAnnouncementRetryAtStartup(t *testing.T) {
//nolint:ll
gossiper := New(Config{
ChainParams: &chaincfg.MainNetParams,
Notifier: tCtx.gossiper.cfg.Notifier,
Broadcast: tCtx.gossiper.cfg.Broadcast,
NotifyWhenOnline: tCtx.gossiper.reliableSender.cfg.NotifyWhenOnline,