router: use SetID as identifier for SendToRoute AMP-payments
This commit is contained in:
parent
f07c9d002c
commit
56a2c65477
@ -1970,6 +1970,13 @@ func (r *ChannelRouter) SendToRoute(htlcHash lntypes.Hash, rt *route.Route) (
|
|||||||
// hash as used for this HTLC.
|
// hash as used for this HTLC.
|
||||||
paymentIdentifier := htlcHash
|
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
|
// Record this payment hash with the ControlTower, ensuring it is not
|
||||||
// already in-flight.
|
// already in-flight.
|
||||||
info := &channeldb.PaymentCreationInfo{
|
info := &channeldb.PaymentCreationInfo{
|
||||||
|
Loading…
Reference in New Issue
Block a user