connectd: check all chain hashs of the network array in init#3371
Merged
Conversation
init
Contributor
|
Ack 9fa93df |
Contributor
|
Ack 9fa93df |
niftynei
requested changes
Dec 24, 2019
niftynei
reviewed
Dec 24, 2019
| * - MAY fail the connection. | ||
| */ | ||
| if (tlvs->networks) { | ||
| if (!tlvs->networks->chains) { |
Collaborator
There was a problem hiding this comment.
nit: this change belongs in a separate commit from the first, as they're not related changes
Member
@rustyrussell you're offline, remember? 😜 |
9fa93df to
6b7a73f
Compare
Contributor
Author
|
Separated into two commits.. Looking at the test now |
Contributor
Author
|
Could finally test it using protocol tests, will cleanup and submit a PR there. What do you think ? |
This is useful for testing.
Contributor
Author
|
Finally I also added a commit to return an error instead of |
Member
|
Only missing a test for this. I think the pyln-proto library might be candidate to inject the |
Contributor
Author
|
@cdecker isn't the protocol test better to test this ? I at first wanted to use |
12 tasks
This file contains hidden or 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
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.
As per lightning/bolts#682 (comment).
We would always check against the first element of the array.. Once again my bad.
This also cleans up a redundant check as pointed out by @rustyrussell.
Changelog-None