Skip to content

Send Init message immediately after handshake even if not initiator #900

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

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

devrandom
Copy link
Member

We were waiting for the initiator, but the spec doesn't guarantee that they will send Init first, so we might theoretically wait forever.

Also, lnprototest expects this behavior.

We were waiting for the initiator, but the spec doesn't guarantee that they will send Init first, so we might theoretically wait forever.

Also, lnprototest expects this behavior.
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #900 (7113dbd) into main (affefb6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #900   +/-   ##
=======================================
  Coverage   90.35%   90.36%           
=======================================
  Files          57       57           
  Lines       29353    29352    -1     
=======================================
+ Hits        26522    26523    +1     
+ Misses       2831     2829    -2     
Impacted Files Coverage Δ
lightning/src/ln/peer_handler.rs 44.17% <100.00%> (-0.07%) ⬇️
lightning/src/ln/functional_tests.rs 96.85% <0.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update affefb6...7113dbd. Read the comment docs.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

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

Code Review ACK 7113dbd

I read again the BOLT init section and effectively it says :

The sending node:
  - MUST send `init` as the first Lightning message for any connection.

Without precising if the sending maps to inbound or outbound or indifferent. Even if minor, I would invite to clarify the spec on this point.

@TheBlueMatt TheBlueMatt merged commit 0725098 into lightningdevkit:main Apr 29, 2021
@devrandom devrandom deleted the init-asap branch April 29, 2021 12:26
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.

3 participants