-
Notifications
You must be signed in to change notification settings - Fork 911
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
HTLC test vector update #4493
Merged
rustyrussell
merged 5 commits into
ElementsProject:master
from
rustyrussell:guilt/htlc-test-vectors
May 3, 2021
Merged
HTLC test vector update #4493
rustyrussell
merged 5 commits into
ElementsProject:master
from
rustyrussell:guilt/htlc-test-vectors
May 3, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allows us to precisely replicate test vectors. Signed-off-by: Rusty Russell <[email protected]>
…ACTUAL_FEE`) Has an out-by-one error, but only used for test-vector generation. Signed-off-by: Rusty Russell <[email protected]>
…sely Still needs some massaging (we print HTLCs as we add them, rather then in the final order, which requires a manual move in one test vector), but this makes it more trivial to compare the output with the BOLT 3 text after lightning/bolts#852 Signed-off-by: Rusty Russell <[email protected]>
As from commit 280e9603e9e4fba820aba2c3d27630c1477a7638. Signed-off-by: Rusty Russell <[email protected]>
Allow generation of static-remote-key variants of testcases. Signed-off-by: Rusty Russell <[email protected]>
rustyrussell
force-pushed
the
guilt/htlc-test-vectors
branch
from
April 27, 2021 04:47
7709725
to
3c34e46
Compare
cdecker
approved these changes
May 1, 2021
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.
ACK 3c34e46
Comment on lines
+901
to
+909
/* Spec was "neatened" to change these numbers to words! */ | ||
tx->wtx->num_outputs == 7 ? "seven outputs" | ||
: tx->wtx->num_outputs == 6 ? "six outputs" | ||
: tx->wtx->num_outputs == 5 ? "five outputs" | ||
: tx->wtx->num_outputs == 4 ? "four outputs" | ||
: tx->wtx->num_outputs == 3 ? "three outputs" | ||
: tx->wtx->num_outputs == 2 ? "two outputs" | ||
: tx->wtx->num_outputs == 1 ? "one output" | ||
: "no outputs???", |
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.
Ugh 😤
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements generation of test vectors to replicate lightning/bolts#539 (merged) and does it in the cleaned-up format proposed in lightning/bolts#852. (When that is merged, we'll need to update some internal bolt quotes, but they're easy).
Changelog-None