contractcourt: settle invoice when claiming HTLC on-chain #2075
Roasbeef left a comment
One style related nit, but other than that, LGTM
Agree with Joost here that this package could certainly use additional unit tests. I don't think it's worth blocking the merge of this PR as this section is already covered with additional unit tests. Further down the release timeline, if we're in a testing freeze with time to spare, we can circle back and bolster the unit tests in this package. This may be something we want to do in-between 0.6 and the next major release as well, while we gather PRs for the next milestone.
In this commit, we extend the remote/receiver chain claim integration test to assert that the on-disk representation of the invoice on the receiving side (Carol) is marked as settled due to the claiming the HTLC on-chain.
Co-authored-by: Joost Jager <email@example.com>
Previously, contract resolvers that needed to publish a second level tx, did not have access to the original htlc amount. This commit reconstructs this amount from data that is already persisted in arbitrator log. Co-authored-by: Joost Jager <firstname.lastname@example.org>
In this commit, we extend the htlcSuccessResolver to settle the invoice, if any, of the corresponding on-chain HTLC sweep. This ensures that the invoice state is consistent as when claiming the HTLC "off-chain".