Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
htlcswitch: hodl invoice #2022
In this PR, a new feature called "hold invoice" is added to
Instead of immediately locking in and settling the htlc when the payment arrives, the htlc for a hold invoice is only locked in and not yet settled. At that point, it is not possible anymore for the sender to revoke the payment, but the receiver still can choose whether to settle or cancel the htlc and invoice.
From the sender perspective, a hold invoice payment request looks identical to a regular payment request. There is no way for the sender to know when a hold invoice is paid to.
Hold invoices enable several new use cases:
To enable hold invoice functionality,
Creation of a hold invoice
To add a holdinvoice, invoke:
Waiting for acceptance
Typically an application wants to receive a notification when the htlc is accepted. This event isn't notified through the general
Settling or canceling
Once the htlc has been accepted in
This PR leaves some issues unaddressed:
referenced this pull request
Oct 24, 2018
2 times, most recently
Nov 26, 2018
cfromknecht left a comment
@joostjager sorry for the delay, just found a bunch of pending comments I thought I had shared.
This PR looks pretty complete to me apart from some higher level changes we've discussed elsewhere. Feel free to ignore any comments that may be irrelevant now, i'll just leave all them here