From: Matt Corallo Date: Thu, 29 Mar 2018 20:42:44 +0000 (-0400) Subject: Fix a small bug in peer_handler X-Git-Tag: v0.0.12~414^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=f452403a3fa04c53704bcc59a27f87c859dd6bd9;p=rust-lightning Fix a small bug in peer_handler --- diff --git a/src/ln/peer_handler.rs b/src/ln/peer_handler.rs index a6992eae4..173467dfc 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