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

Fix panic when peer is mid-handshake #2842

Merged

Commits on Jan 22, 2024

  1. Fix panic when peer is mid-handshake

    Peer::their_node_id is set to Some during the handshake process.
    However, df3ab2e accesses the field
    unconditionally, causing a panic. This may be triggered if a gossip
    message is received mid-handshake from another peer or if the user calls
    broadcast_node_announcement during this time. The latter tends to be
    executed on a timer.
    
    Ensure that Peer::their_node_id is only accessed once the handshake is
    complete.
    jkczyz committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    c7465bd View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary unwraps

    jkczyz committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    7b8d018 View commit details
    Browse the repository at this point in the history