Skip to content

Commit 925c7fb

Browse files
committed
f add a comment about error messages as suggested by arik
1 parent eaf629c commit 925c7fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ impl MessageSendEventsProvider for DummyChannelHandler {
9292
}
9393
}
9494
impl ChannelMessageHandler for DummyChannelHandler {
95+
// Any messages which are related to a specific channel generate an error message to let the
96+
// peer know we don't care about channels.
9597
fn handle_open_channel(&self, their_node_id: &PublicKey, _their_features: InitFeatures, msg: &msgs::OpenChannel) {
9698
DummyChannelHandler::push_error(self, their_node_id, msg.temporary_channel_id);
9799
}
@@ -137,11 +139,11 @@ impl ChannelMessageHandler for DummyChannelHandler {
137139
fn handle_announcement_signatures(&self, their_node_id: &PublicKey, msg: &msgs::AnnouncementSignatures) {
138140
DummyChannelHandler::push_error(self, their_node_id, msg.channel_id);
139141
}
140-
fn peer_disconnected(&self, _their_node_id: &PublicKey, _no_connection_possible: bool) {}
141-
fn peer_connected(&self, _their_node_id: &PublicKey, _msg: &msgs::Init) {}
142142
fn handle_channel_reestablish(&self, their_node_id: &PublicKey, msg: &msgs::ChannelReestablish) {
143143
DummyChannelHandler::push_error(self, their_node_id, msg.channel_id);
144144
}
145+
fn peer_disconnected(&self, _their_node_id: &PublicKey, _no_connection_possible: bool) {}
146+
fn peer_connected(&self, _their_node_id: &PublicKey, _msg: &msgs::Init) {}
145147
fn handle_error(&self, _their_node_id: &PublicKey, _msg: &msgs::ErrorMessage) {}
146148
}
147149
impl Deref for DummyChannelHandler {

0 commit comments

Comments
 (0)