|
7 | 7 | "github.com/btcsuite/btcd/btcec/v2"
|
8 | 8 | "github.com/btcsuite/btcd/btcutil"
|
9 | 9 | "github.com/lightningnetwork/lnd/fn/v2"
|
10 |
| - "github.com/lightningnetwork/lnd/lnwallet/chainfee" |
11 | 10 | "github.com/lightningnetwork/lnd/tlv"
|
12 | 11 | )
|
13 | 12 |
|
@@ -39,10 +38,6 @@ const (
|
39 | 38 | // DPChannelType is the TLV type number that identifies the record for
|
40 | 39 | // DynPropose.ChannelType.
|
41 | 40 | DPChannelType tlv.Type = 6
|
42 |
| - |
43 |
| - // DPKickoffFeerate is the TLV type number that identifies the record |
44 |
| - // for DynPropose.KickoffFeerate. |
45 |
| - DPKickoffFeerate tlv.Type = 7 |
46 | 41 | )
|
47 | 42 |
|
48 | 43 | // DynPropose is a message that is sent during a dynamic commitments negotiation
|
@@ -80,11 +75,6 @@ type DynPropose struct {
|
80 | 75 | // parameter.
|
81 | 76 | ChannelType fn.Option[ChannelType]
|
82 | 77 |
|
83 |
| - // KickoffFeerate proposes the fee rate in satoshis per kw that it |
84 |
| - // is offering for a ChannelType conversion that requires a kickoff |
85 |
| - // transaction. |
86 |
| - KickoffFeerate fn.Option[chainfee.SatPerKWeight] |
87 |
| - |
88 | 78 | // ExtraData is the set of data that was appended to this message to
|
89 | 79 | // fill out the full maximum transport message size. These fields can
|
90 | 80 | // be used to specify optional data such as custom TLV fields.
|
@@ -164,14 +154,6 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
|
164 | 154 | ),
|
165 | 155 | )
|
166 | 156 | })
|
167 |
| - dp.KickoffFeerate.WhenSome(func(kickoffFeerate chainfee.SatPerKWeight) { |
168 |
| - protoSats := uint32(kickoffFeerate) |
169 |
| - tlvRecords = append( |
170 |
| - tlvRecords, tlv.MakePrimitiveRecord( |
171 |
| - DPKickoffFeerate, &protoSats, |
172 |
| - ), |
173 |
| - ) |
174 |
| - }) |
175 | 157 | tlv.SortRecords(tlvRecords)
|
176 | 158 |
|
177 | 159 | tlvStream, err := tlv.NewStream(tlvRecords...)
|
@@ -244,15 +226,10 @@ func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
|
244 | 226 | channelTypeEncoder, channelTypeDecoder,
|
245 | 227 | )
|
246 | 228 |
|
247 |
| - var kickoffFeerateScratch uint32 |
248 |
| - kickoffFeerate := tlv.MakePrimitiveRecord( |
249 |
| - DPKickoffFeerate, &kickoffFeerateScratch, |
250 |
| - ) |
251 |
| - |
252 | 229 | // Create set of Records to read TLV bytestream into.
|
253 | 230 | records := []tlv.Record{
|
254 | 231 | dustLimit, maxValue, reserve, csvDelay, maxHtlcs, fundingKey,
|
255 |
| - chanType, kickoffFeerate, |
| 232 | + chanType, |
256 | 233 | }
|
257 | 234 | tlv.SortRecords(records)
|
258 | 235 |
|
@@ -291,11 +268,6 @@ func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
|
291 | 268 | if val, ok := typeMap[DPChannelType]; ok && val == nil {
|
292 | 269 | dp.ChannelType = fn.Some(chanTypeScratch)
|
293 | 270 | }
|
294 |
| - if val, ok := typeMap[DPKickoffFeerate]; ok && val == nil { |
295 |
| - dp.KickoffFeerate = fn.Some( |
296 |
| - chainfee.SatPerKWeight(kickoffFeerateScratch), |
297 |
| - ) |
298 |
| - } |
299 | 271 |
|
300 | 272 | if len(tlvRecords) != 0 {
|
301 | 273 | dp.ExtraData = tlvRecords
|
@@ -379,14 +351,6 @@ func (dp *DynPropose) SerializeTlvData() ([]byte, error) {
|
379 | 351 | ),
|
380 | 352 | )
|
381 | 353 | })
|
382 |
| - dp.KickoffFeerate.WhenSome(func(kickoffFeerate chainfee.SatPerKWeight) { |
383 |
| - protoSats := uint32(kickoffFeerate) |
384 |
| - tlvRecords = append( |
385 |
| - tlvRecords, tlv.MakePrimitiveRecord( |
386 |
| - DPKickoffFeerate, &protoSats, |
387 |
| - ), |
388 |
| - ) |
389 |
| - }) |
390 | 354 | tlv.SortRecords(tlvRecords)
|
391 | 355 |
|
392 | 356 | tlvStream, err := tlv.NewStream(tlvRecords...)
|
|
0 commit comments