From: Devrandom Date: Wed, 28 Apr 2021 13:22:34 +0000 (+0200) Subject: Send Init message immediately after handshake even if not initiator X-Git-Tag: v0.0.14~10^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=7113dbd90498d61d3d0c44a05ab010c0fa42231c;p=rust-lightning Send Init message immediately after handshake even if not initiator 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. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index d4eb9eae5..2559acfc2 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -233,7 +233,6 @@ enum InitSyncTracker{ struct Peer { channel_encryptor: PeerChannelEncryptor, - outbound: bool, their_node_id: Option, their_features: Option, @@ -465,7 +464,6 @@ impl PeerManager PeerManager PeerManager { if peer.pending_read_is_header { @@ -854,12 +854,6 @@ impl PeerManager