@@ -110,24 +110,16 @@ func (dc *DynCommit) Decode(r io.Reader, _ uint32) error {
110110 // Check the results of the TLV Stream decoding and appropriately set
111111 // message fields.
112112 if _ , ok := knownRecords [dc .DustLimit .TlvType ()]; ok {
113- var rec tlv.RecordT [tlv.TlvType0 , tlv.BigSizeT [btcutil.Amount ]]
114- rec .Val = dustLimit .Val
115- dc .DustLimit = tlv .SomeRecordT (rec )
113+ dc .DustLimit = tlv .SomeRecordT (dustLimit )
116114 }
117115 if _ , ok := knownRecords [dc .MaxValueInFlight .TlvType ()]; ok {
118- var rec tlv.RecordT [tlv.TlvType2 , MilliSatoshi ]
119- rec .Val = maxValue .Val
120- dc .MaxValueInFlight = tlv .SomeRecordT (rec )
116+ dc .MaxValueInFlight = tlv .SomeRecordT (maxValue )
121117 }
122118 if _ , ok := knownRecords [dc .HtlcMinimum .TlvType ()]; ok {
123- var rec tlv.RecordT [tlv.TlvType4 , MilliSatoshi ]
124- rec .Val = htlcMin .Val
125- dc .HtlcMinimum = tlv .SomeRecordT (rec )
119+ dc .HtlcMinimum = tlv .SomeRecordT (htlcMin )
126120 }
127121 if _ , ok := knownRecords [dc .ChannelReserve .TlvType ()]; ok {
128- var rec tlv.RecordT [tlv.TlvType6 , tlv.BigSizeT [btcutil.Amount ]]
129- rec .Val = reserve .Val
130- dc .ChannelReserve = tlv .SomeRecordT (rec )
122+ dc .ChannelReserve = tlv .SomeRecordT (reserve )
131123 }
132124 if _ , ok := knownRecords [dc .CsvDelay .TlvType ()]; ok {
133125 dc .CsvDelay = tlv .SomeRecordT (csvDelay )
0 commit comments