4
4
"bytes"
5
5
"io"
6
6
7
- "github.com/btcsuite/btcd/btcec/v2"
8
7
"github.com/btcsuite/btcd/btcutil"
9
8
"github.com/lightningnetwork/lnd/fn/v2"
10
9
"github.com/lightningnetwork/lnd/tlv"
@@ -31,10 +30,6 @@ const (
31
30
// for DynPropose.MaxAcceptedHTLCs.
32
31
DPMaxAcceptedHtlcs tlv.Type = 4
33
32
34
- // DPFundingPubkey is the TLV type number that identifies the record for
35
- // DynPropose.FundingKey.
36
- DPFundingPubkey tlv.Type = 5
37
-
38
33
// DPChannelType is the TLV type number that identifies the record for
39
34
// DynPropose.ChannelType.
40
35
DPChannelType tlv.Type = 6
@@ -67,10 +62,6 @@ type DynPropose struct {
67
62
// max_accepted_htlcs limit of the sender.
68
63
MaxAcceptedHTLCs fn.Option [uint16 ]
69
64
70
- // FundingKey, if not nil, proposes a change to the funding_pubkey
71
- // parameter of the sender.
72
- FundingKey fn.Option [btcec.PublicKey ]
73
-
74
65
// ChannelType, if not nil, proposes a change to the channel_type
75
66
// parameter.
76
67
ChannelType fn.Option [ChannelType ]
@@ -137,14 +128,6 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
137
128
),
138
129
)
139
130
})
140
- dp .FundingKey .WhenSome (func (key btcec.PublicKey ) {
141
- keyScratch := & key
142
- tlvRecords = append (
143
- tlvRecords , tlv .MakePrimitiveRecord (
144
- DPFundingPubkey , & keyScratch ,
145
- ),
146
- )
147
- })
148
131
dp .ChannelType .WhenSome (func (ty ChannelType ) {
149
132
tlvRecords = append (
150
133
tlvRecords , tlv .MakeDynamicRecord (
@@ -215,11 +198,6 @@ func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
215
198
DPMaxAcceptedHtlcs , & maxHtlcsScratch ,
216
199
)
217
200
218
- var fundingKeyScratch * btcec.PublicKey
219
- fundingKey := tlv .MakePrimitiveRecord (
220
- DPFundingPubkey , & fundingKeyScratch ,
221
- )
222
-
223
201
var chanTypeScratch ChannelType
224
202
chanType := tlv .MakeDynamicRecord (
225
203
DPChannelType , & chanTypeScratch , chanTypeScratch .featureBitLen ,
@@ -228,8 +206,7 @@ func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
228
206
229
207
// Create set of Records to read TLV bytestream into.
230
208
records := []tlv.Record {
231
- dustLimit , maxValue , reserve , csvDelay , maxHtlcs , fundingKey ,
232
- chanType ,
209
+ dustLimit , maxValue , reserve , csvDelay , maxHtlcs , chanType ,
233
210
}
234
211
tlv .SortRecords (records )
235
212
@@ -262,9 +239,6 @@ func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
262
239
if val , ok := typeMap [DPMaxAcceptedHtlcs ]; ok && val == nil {
263
240
dp .MaxAcceptedHTLCs = fn .Some (maxHtlcsScratch )
264
241
}
265
- if val , ok := typeMap [DPFundingPubkey ]; ok && val == nil {
266
- dp .FundingKey = fn .Some (* fundingKeyScratch )
267
- }
268
242
if val , ok := typeMap [DPChannelType ]; ok && val == nil {
269
243
dp .ChannelType = fn .Some (chanTypeScratch )
270
244
}
@@ -334,14 +308,6 @@ func (dp *DynPropose) SerializeTlvData() ([]byte, error) {
334
308
),
335
309
)
336
310
})
337
- dp .FundingKey .WhenSome (func (key btcec.PublicKey ) {
338
- keyScratch := & key
339
- tlvRecords = append (
340
- tlvRecords , tlv .MakePrimitiveRecord (
341
- DPFundingPubkey , & keyScratch ,
342
- ),
343
- )
344
- })
345
311
dp .ChannelType .WhenSome (func (ty ChannelType ) {
346
312
tlvRecords = append (
347
313
tlvRecords , tlv .MakeDynamicRecord (
0 commit comments