From 7113dbd90498d61d3d0c44a05ab010c0fa42231c Mon Sep 17 00:00:00 2001 From: Devrandom Date: Wed, 28 Apr 2021 15:22:34 +0200 Subject: [PATCH] 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. --- lightning/src/ln/peer_handler.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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