Skip to content

Commit f452403

Browse files
committed
Fix a small bug in peer_handler
1 parent 7b0a25b commit f452403

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ln/peer_handler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
279279
let act_three = try_potential_handleerror!(peer.channel_encryptor.process_act_two(&peer.pending_read_buffer[..], &self.our_node_secret)).to_vec();
280280
peer.pending_outbound_buffer.push_back(act_three);
281281
peer.pending_read_buffer = [0; 18].to_vec(); // Message length header is 18 bytes
282+
peer.pending_read_is_header = true;
282283

283284
insert_node_id = Some(peer.their_node_id.unwrap());
284285
encode_and_send_msg!(msgs::Init {
@@ -317,7 +318,9 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
317318
if msg.local_features.requires_unknown_bits() {
318319
return Err(PeerHandleError{});
319320
}
320-
//TODO: Store features!
321+
//TODO: Store features (and check that we've
322+
//received Init prior to any other messages)!
323+
//TODO: Respond to Init with Init if we're inbound.
321324
},
322325
17 => {
323326
// Error msg

0 commit comments

Comments
 (0)