Skip to content

Commit

Permalink
router: use SetID as identifier for SendToRoute AMP-payments
Browse files Browse the repository at this point in the history
  • Loading branch information
halseth committed Apr 27, 2021
1 parent f07c9d0 commit 56a2c65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions routing/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,13 @@ func (r *ChannelRouter) SendToRoute(htlcHash lntypes.Hash, rt *route.Route) (
// hash as used for this HTLC.
paymentIdentifier := htlcHash

// For AMP-payments, we'll use the setID as the unique ID for the
// overall payment.
amp := finalHop.AMP
if amp != nil {
paymentIdentifier = amp.SetID()
}

// Record this payment hash with the ControlTower, ensuring it is not
// already in-flight.
info := &channeldb.PaymentCreationInfo{
Expand Down

0 comments on commit 56a2c65

Please sign in to comment.