Skip to content

Commit

Permalink
add MPP record details to payment
Browse files Browse the repository at this point in the history
fixes #128
  • Loading branch information
C-Otto committed Jan 3, 2021
1 parent 53b3b3d commit 8ba9684
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def get_route(self, pub_key, amount, ignored_edges, ignored_nodes, first_hop_cha
return None

def send_payment(self, payment_request, route):
last_hop = route.hops[-1]
last_hop.mpp_record.payment_addr = payment_request.payment_addr
last_hop.mpp_record.total_amt_msat = payment_request.num_msat
request = lnrouter.SendToRouteRequest(route=route)
request.payment_hash = self.hex_string_to_bytes(payment_request.payment_hash)
return self.router_stub.SendToRoute(request)
Expand Down

1 comment on commit 8ba9684

@githorray
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Confirmed working with version 0.12.0-beta.rc3 commit=v0.12.0-beta.rc3.

Please sign in to comment.