-
Notifications
You must be signed in to change notification settings - Fork 339
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 support for networks
field in Init
message
#2329
Add support for networks
field in Init
message
#2329
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2329 +/- ##
========================================
Coverage 90.34% 90.35%
========================================
Files 104 104
Lines 53392 53590 +198
Branches 53392 53590 +198
========================================
+ Hits 48237 48421 +184
- Misses 5155 5169 +14
☔ View full report in Codecov by Sentry. |
4c910ac
to
767d20f
Compare
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.
Awesome, thanks! Basically LGTM.
ecce9e3
to
abdcef3
Compare
Going to just do some testing on the sample against some other nodes on the network with this change in. |
Cool, so at least checked against a mainnet and testnet eclair node using LDK sample on mainnet Connecting to peer supporting mainnet successfully:
Connecting to peer only supporting testnet results in immediate disconnection:
|
abdcef3
to
5f3329d
Compare
5f3329d
to
a114dd3
Compare
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.
Otherwise LGTM
This was a fairly old introduction to the spec to allow nodes to indicate to their peers what chains they are interested in (i.e. will open channels and gossip for). We don't do any of the handling of this message in this commit and leave that to the very next commit, so the behaviour is effectively the same (ignore networks preference).
If the `networks` field is present in a received `Init` message, then we need to make sure our genesis chain hash matches one of those, otherwise we should disconnect the peer. We now also always send our genesis chain hash in `Init` messages to our peers.
a114dd3
to
b52b936
Compare
Resolves #2241