Skip to content

Update BOLT11 test vectors, strengthen implementation.#3481

Merged
cdecker merged 6 commits into
ElementsProject:masterfrom
rustyrussell:guilt/update-bolt11-test-vectors
Feb 5, 2020
Merged

Update BOLT11 test vectors, strengthen implementation.#3481
cdecker merged 6 commits into
ElementsProject:masterfrom
rustyrussell:guilt/update-bolt11-test-vectors

Conversation

@rustyrussell
Copy link
Copy Markdown
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
Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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