-
Notifications
You must be signed in to change notification settings - Fork 491
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
bolt3: test vector fixes #1056
bolt3: test vector fixes #1056
Conversation
The commitment transaction tests are all meant to use the same funding transaction which has an amount of 10000000000 msat. The LocalBalance and RemoteBalance along with the value of any htlcs should always add up to this amount. This commit updates the `simple commitment tx with no HTLCs and single anchor` anchors test to comply with the above.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the legacy test accordingly.
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.
Since rust-lightning
only supports static remote key out of all of the test vectors updated here (legacy, static remote key, simple anchors), I was only able to verify those match.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the static-remote test accordingly.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the anchors test accordingly.
1805926
to
d8b8b1e
Compare
Add latest fixes from lightning/bolts#1056
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.
Thanks, I've updated eclair to match these tests, LGTM 👍
Add latest changes from lightning/bolts#1018 Add latest fixes from lightning/bolts#1056
It seems as if the test vectors were not correctly updated after the change in this PR was applied. This could lead to different
test results depending on if the test used the
ToLocalBalance
defined by the test orinstead derived the balance by taking the funding amount and subtracting the htlc
amounts, remote balance and fees.
The PR also fixes the test called "simple commitment tx with no HTLCs and single anchor"
which currently does not have the correct channel capacity.