From f452403a3fa04c53704bcc59a27f87c859dd6bd9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 29 Mar 2018 16:42:44 -0400 Subject: [PATCH] Fix a small bug in peer_handler --- src/ln/peer_handler.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ln/peer_handler.rs b/src/ln/peer_handler.rs index a6992eae..173467df 100644 --- a/src/ln/peer_handler.rs +++ b/src/ln/peer_handler.rs @@ -279,6 +279,7 @@ impl PeerManager { let act_three = try_potential_handleerror!(peer.channel_encryptor.process_act_two(&peer.pending_read_buffer[..], &self.our_node_secret)).to_vec(); peer.pending_outbound_buffer.push_back(act_three); peer.pending_read_buffer = [0; 18].to_vec(); // Message length header is 18 bytes + peer.pending_read_is_header = true; insert_node_id = Some(peer.their_node_id.unwrap()); encode_and_send_msg!(msgs::Init { @@ -317,7 +318,9 @@ impl PeerManager { if msg.local_features.requires_unknown_bits() { return Err(PeerHandleError{}); } - //TODO: Store features! + //TODO: Store features (and check that we've + //received Init prior to any other messages)! + //TODO: Respond to Init with Init if we're inbound. }, 17 => { // Error msg -- 2.30.2