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

Add network to init message #3300

Merged
merged 4 commits into from
Nov 29, 2019
Merged

Conversation

darosior
Copy link
Collaborator

This implements lightning/bolts#682

connectd/connectd.c Outdated Show resolved Hide resolved
connectd/peer_exchange_initmsg.c Show resolved Hide resolved
devtools/gossipwith.c Outdated Show resolved Hide resolved
devtools/gossipwith.c Outdated Show resolved Hide resolved
devtools/gossipwith.c Outdated Show resolved Hide resolved
We are going to signal the genesis block hash in the init message.
@darosior
Copy link
Collaborator Author

Rebased to correct the use of chainparams (just initializing it at connectd init was enough) and add minor fixups to gossipwith (and add a once-again-forgotten Changelog-Added!).

Changelog-Added: protocol: We now signal the network we are running on at init.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

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

Ack a445b9e

Technically, this isn't in the spec yet, so it should be wrapped in EXPERIMENTAL_FEATURES until it is. However, all the spec needs is interop testing, so if we can do that with LND or Eclair (once they've implemented it!) we can apply this.

devtools/gossipwith.c Outdated Show resolved Hide resolved
devtools/gossipwith.c Outdated Show resolved Hide resolved
If specified, this will add the corresponding chain_hash to the init message.
@cdecker
Copy link
Member

cdecker commented Nov 29, 2019

Re-applying @rustyrussell's ACK, and merging:

ACK bcc7e70

@cdecker cdecker merged commit cd11c20 into ElementsProject:master Nov 29, 2019
Comment on lines +78 to +82
if (!tlvs->networks->chains) {
status_peer_debug(&peer->id,
"bad networks TLV in init '%s', closing",
tal_hex(tmpctx, msg));
return io_close(conn);
Copy link
Contributor

Choose a reason for hiding this comment

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

Note this is technically redundant, since it's covered elegently by the next part anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants