@@ -1152,13 +1152,14 @@ func (lc *LightningChannel) logUpdateToPayDesc(logUpdate *channeldb.LogUpdate,
11521152 ogHTLC := remoteUpdateLog .lookupHtlc (wireMsg .ID )
11531153
11541154 pd = & paymentDescriptor {
1155- ChanID : wireMsg .ChanID ,
1156- Amount : ogHTLC .Amount ,
1157- RHash : ogHTLC .RHash ,
1158- ParentIndex : ogHTLC .HtlcIndex ,
1159- LogIndex : logUpdate .LogIndex ,
1160- EntryType : Fail ,
1161- FailReason : wireMsg .Reason [:],
1155+ ChanID : wireMsg .ChanID ,
1156+ Amount : ogHTLC .Amount ,
1157+ RHash : ogHTLC .RHash ,
1158+ ParentIndex : ogHTLC .HtlcIndex ,
1159+ LogIndex : logUpdate .LogIndex ,
1160+ EntryType : Fail ,
1161+ FailReason : wireMsg .Reason [:],
1162+ FailExtraData : wireMsg .ExtraData ,
11621163 removeCommitHeights : lntypes.Dual [uint64 ]{
11631164 Remote : commitHeight ,
11641165 },
@@ -1252,13 +1253,14 @@ func (lc *LightningChannel) localLogUpdateToPayDesc(logUpdate *channeldb.LogUpda
12521253 ogHTLC := remoteUpdateLog .lookupHtlc (wireMsg .ID )
12531254
12541255 return & paymentDescriptor {
1255- ChanID : wireMsg .ChanID ,
1256- Amount : ogHTLC .Amount ,
1257- RHash : ogHTLC .RHash ,
1258- ParentIndex : ogHTLC .HtlcIndex ,
1259- LogIndex : logUpdate .LogIndex ,
1260- EntryType : Fail ,
1261- FailReason : wireMsg .Reason [:],
1256+ ChanID : wireMsg .ChanID ,
1257+ Amount : ogHTLC .Amount ,
1258+ RHash : ogHTLC .RHash ,
1259+ ParentIndex : ogHTLC .HtlcIndex ,
1260+ LogIndex : logUpdate .LogIndex ,
1261+ EntryType : Fail ,
1262+ FailReason : wireMsg .Reason [:],
1263+ FailExtraData : wireMsg .ExtraData ,
12621264 removeCommitHeights : lntypes.Dual [uint64 ]{
12631265 Remote : commitHeight ,
12641266 },
@@ -1367,13 +1369,14 @@ func (lc *LightningChannel) remoteLogUpdateToPayDesc(logUpdate *channeldb.LogUpd
13671369 ogHTLC := localUpdateLog .lookupHtlc (wireMsg .ID )
13681370
13691371 return & paymentDescriptor {
1370- ChanID : wireMsg .ChanID ,
1371- Amount : ogHTLC .Amount ,
1372- RHash : ogHTLC .RHash ,
1373- ParentIndex : ogHTLC .HtlcIndex ,
1374- LogIndex : logUpdate .LogIndex ,
1375- EntryType : Fail ,
1376- FailReason : wireMsg .Reason [:],
1372+ ChanID : wireMsg .ChanID ,
1373+ Amount : ogHTLC .Amount ,
1374+ RHash : ogHTLC .RHash ,
1375+ ParentIndex : ogHTLC .HtlcIndex ,
1376+ LogIndex : logUpdate .LogIndex ,
1377+ EntryType : Fail ,
1378+ FailReason : wireMsg .Reason [:],
1379+ FailExtraData : wireMsg .ExtraData ,
13771380 removeCommitHeights : lntypes.Dual [uint64 ]{
13781381 Local : commitHeight ,
13791382 },
@@ -6298,7 +6301,8 @@ func (lc *LightningChannel) ReceiveHTLCSettle(preimage [32]byte, htlcIndex uint6
62986301// NOTE: It is okay for sourceRef, destRef, and closeKey to be nil when unit
62996302// testing the wallet.
63006303func (lc * LightningChannel ) FailHTLC (htlcIndex uint64 , reason []byte ,
6301- sourceRef * channeldb.AddRef , destRef * channeldb.SettleFailRef ,
6304+ extraData lnwire.ExtraOpaqueData , sourceRef * channeldb.AddRef ,
6305+ destRef * channeldb.SettleFailRef ,
63026306 closeKey * models.CircuitKey ) error {
63036307
63046308 lc .Lock ()
@@ -6326,6 +6330,7 @@ func (lc *LightningChannel) FailHTLC(htlcIndex uint64, reason []byte,
63266330 SourceRef : sourceRef ,
63276331 DestRef : destRef ,
63286332 ClosedCircuitKey : closeKey ,
6333+ FailExtraData : extraData ,
63296334 }
63306335
63316336 lc .updateLogs .Local .appendUpdate (pd )
@@ -6393,7 +6398,7 @@ func (lc *LightningChannel) MalformedFailHTLC(htlcIndex uint64,
63936398// commitment update. This method should be called in response to the upstream
63946399// party cancelling an outgoing HTLC.
63956400func (lc * LightningChannel ) ReceiveFailHTLC (htlcIndex uint64 , reason []byte ,
6396- ) error {
6401+ extraData lnwire. ExtraOpaqueData ) error {
63976402
63986403 lc .Lock ()
63996404 defer lc .Unlock ()
@@ -6410,13 +6415,14 @@ func (lc *LightningChannel) ReceiveFailHTLC(htlcIndex uint64, reason []byte,
64106415 }
64116416
64126417 pd := & paymentDescriptor {
6413- ChanID : lc .ChannelID (),
6414- Amount : htlc .Amount ,
6415- RHash : htlc .RHash ,
6416- ParentIndex : htlc .HtlcIndex ,
6417- LogIndex : lc .updateLogs .Remote .logIndex ,
6418- EntryType : Fail ,
6419- FailReason : reason ,
6418+ ChanID : lc .ChannelID (),
6419+ Amount : htlc .Amount ,
6420+ RHash : htlc .RHash ,
6421+ ParentIndex : htlc .HtlcIndex ,
6422+ LogIndex : lc .updateLogs .Remote .logIndex ,
6423+ EntryType : Fail ,
6424+ FailReason : reason ,
6425+ FailExtraData : extraData ,
64206426 }
64216427
64226428 lc .updateLogs .Remote .appendUpdate (pd )
0 commit comments