-
Notifications
You must be signed in to change notification settings - Fork 913
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
connectd: check all chain hashs of the network array in init
#3371
Conversation
init
Ack 9fa93df |
Ack 9fa93df |
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.
needs a test (specifically to show it fixes the reported error would be ideal) 😉
@@ -75,12 +75,6 @@ static struct io_plan *peer_init_received(struct io_conn *conn, | |||
* - MAY fail the connection. | |||
*/ | |||
if (tlvs->networks) { | |||
if (!tlvs->networks->chains) { |
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.
nit: this change belongs in a separate commit from the first, as they're not related changes
@rustyrussell you're offline, remember? 😜 |
9fa93df
to
6b7a73f
Compare
Separated into two commits.. Looking at the test now |
Could finally test it using protocol tests, will cleanup and submit a PR there. What do you think ? |
This is useful for testing.
Finally I also added a commit to return an error instead of |
Only missing a test for this. I think the pyln-proto library might be candidate to inject the |
@cdecker isn't the protocol test better to test this ? I at first wanted to use |
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