-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters