7
7
"fmt"
8
8
"io"
9
9
10
- "github.com/btcsuite/btcd/btcec/v2"
11
10
"github.com/btcsuite/btcd/btcutil"
12
11
"github.com/btcsuite/btcd/txscript"
13
12
"github.com/lightningnetwork/lnd/channeldb"
@@ -18,7 +17,6 @@ import (
18
17
"github.com/lightningnetwork/lnd/lnwallet"
19
18
"github.com/lightningnetwork/lnd/lnwire"
20
19
"github.com/lightningnetwork/lnd/queue"
21
- "github.com/lightningnetwork/lnd/tlv"
22
20
)
23
21
24
22
// htlcIncomingContestResolver is a ContractResolver that's able to resolve an
@@ -522,18 +520,15 @@ func (h *htlcIncomingContestResolver) Supplement(htlc channeldb.HTLC) {
522
520
func (h * htlcIncomingContestResolver ) decodePayload () (* hop.Payload ,
523
521
[]byte , error ) {
524
522
525
- var blindingPoint * btcec.PublicKey
526
- h .htlc .BlindingPoint .WhenSome (
527
- func (b tlv.RecordT [lnwire.BlindingPointTlvType ,
528
- * btcec.PublicKey ]) {
529
-
530
- blindingPoint = b .Val
531
- },
532
- )
523
+ blindingInfo := hop.ReconstructBlindingInfo {
524
+ IncomingAmt : h .htlc .Amt ,
525
+ IncomingExpiry : h .htlc .RefundTimeout ,
526
+ BlindingKey : h .htlc .BlindingPoint ,
527
+ }
533
528
534
529
onionReader := bytes .NewReader (h .htlc .OnionBlob [:])
535
530
iterator , err := h .OnionProcessor .ReconstructHopIterator (
536
- onionReader , h .htlc .RHash [:], blindingPoint ,
531
+ onionReader , h .htlc .RHash [:], blindingInfo ,
537
532
)
538
533
if err != nil {
539
534
return nil , nil , err
0 commit comments