File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3793,7 +3793,18 @@ func (l *channelLink) processExitHop(add lnwire.UpdateAddHTLC,
37933793 // As we're the exit hop, we'll double check the hop-payload included in
37943794 // the HTLC to ensure that it was crafted correctly by the sender and
37953795 // is compatible with the HTLC we were extended.
3796- if add .Amount < fwdInfo .AmountToForward {
3796+ //
3797+ // For a special case, if the fwdInfo doesn't have any blinded path
3798+ // information, and the incoming HTLC had special extra data, then
3799+ // we'll skip this amount check. The invoice acceptor will make sure we
3800+ // reject the HTLC if it's not containing the correct amount after
3801+ // examining the custom data.
3802+ hasBlindedPath := fwdInfo .NextBlinding .IsSome ()
3803+ customHTLC := len (add .CustomRecords ) > 0 && ! hasBlindedPath
3804+ log .Tracef ("Exit hop has_blinded_path=%v custom_htlc_bypass=%v" ,
3805+ hasBlindedPath , customHTLC )
3806+
3807+ if ! customHTLC && add .Amount < fwdInfo .AmountToForward {
37973808 l .log .Errorf ("onion payload of incoming htlc(%x) has " +
37983809 "incompatible value: expected <=%v, got %v" ,
37993810 add .PaymentHash , add .Amount , fwdInfo .AmountToForward )
You can’t perform that action at this time.
0 commit comments