-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strict forwarding pt.2 #1244
Strict forwarding pt.2 #1244
Conversation
Will add some Litd itest coverage too |
Pull Request Test Coverage Report for Build 12313714722Details
💛 - Coveralls |
b3abdb1
to
7a8eb9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🏆
We'll merge this after the |
Previously we had strict-forwarding protection placed in the AuxInvoiceManager, but that would only protect asset invoices against pure-btc HTLCs. This commit adds the inverse complementary check which prevents settling the invoice if btc ras requested but assets were offered.
In this commit we add an extra test case that checks if the AuxInvoiceManager will reject the asset HTLCs that pay to a btc invoice. We also do some housekeeping (commonly used vars, comments) across the other test cases.
In this commit we extend the property based tests to account for the new piece of AuxInvoiceManager behavior. If the randomly generated invoice is not an asset invoice, but the HTLCs do carry assets, we should expect the manager to reject the HTLCs.
7a8eb9f
to
ffc6e68
Compare
Since this is breaking the current expected behavior from LitD itests, we are not going to see a green Refer to the respective LitD PR for the correct state of the itests |
LitD itests are green, merging this |
7358c1b
Description
In a previous PR we added strict forwarding support, meaning that an invoice that asks for asset X may only be settled if the HTLCs are carrying asset X. We did not think of strict forwarding protection for btc invoices being paid for with asset HTLCs.
Solution
In this PR we extend the
AuxInvoiceManager
with an extra check, which cancels the HTLCs that are paying to this invoice if the invoice is a btc invoice, but the HTLCs are carrying assets.Related Issues
Closes #1239