Skip to content
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

Update BOLT11 test vectors, strengthen implementation. #3481

Merged

Conversation

rustyrussell
Copy link
Contributor

These new test vectors are proposed in the spec at lightning/bolts#736 but the improvements stand on their own anyway.

This next test will have route hints.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See-also: lightning/bolts#699
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
As tested in next test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See-also: lightning/bolts#736
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Otherwise you can ask for a sub-millisatoshi amount, which is dumb and
violates the spec.

See-also: lightning/bolts#736
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: We now reject invoices which ask for sub-millisatoshi amounts
@rustyrussell rustyrussell added this to the 0.8.1 milestone Feb 3, 2020
common/bolt11.c Outdated
Comment on lines 393 to 400
} else {
/* Restore version for unknown field! */
(*data)--;
(*data_len)++;
data_length++;
return unknown_field(b11, hu5, data, data_len, 'f',
data_length);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab vs spaces mix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I didn't fix current code. Will append a whitespace patch though

Didn't generally fixup inside comments and the bech32 code: reformatting that
is just anti-social.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@cdecker
Copy link
Member

cdecker commented Feb 4, 2020

ACK a253e8a

@cdecker cdecker merged commit f376a9c into ElementsProject:master Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants