]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Include the message type when we send unreadable gossip msg errors 2022-09-log-unreadable-type
authorMatt Corallo <git@bluematt.me>
Mon, 12 Sep 2022 15:35:56 +0000 (15:35 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 12 Sep 2022 15:35:56 +0000 (15:35 +0000)
lightning/src/ln/peer_handler.rs

index 838927cb2367ac0e0af1fab435edb7a1170e27da..aae602cfa30057ffeed03dd0762dd4f63efd1d59 100644 (file)
@@ -1127,7 +1127,10 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
                                                                                                }
                                                                                                (_, Some(ty)) if is_gossip_msg(ty) => {
                                                                                                        log_gossip!(self.logger, "Got an invalid value while deserializing a gossip message");
-                                                                                                       self.enqueue_message(peer, &msgs::WarningMessage { channel_id: [0; 32], data: "Unreadable/bogus gossip message".to_owned() });
+                                                                                                       self.enqueue_message(peer, &msgs::WarningMessage {
+                                                                                                               channel_id: [0; 32],
+                                                                                                               data: format!("Unreadable/bogus gossip message of type {}", ty),
+                                                                                                       });
                                                                                                        continue;
                                                                                                }
                                                                                                (msgs::DecodeError::UnknownRequiredFeature, ty) => {