]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add trace logs for Errs when handling peer messages
authorMatt Corallo <git@bluematt.me>
Thu, 23 Aug 2018 20:05:57 +0000 (16:05 -0400)
committerMatt Corallo <git@bluematt.me>
Thu, 23 Aug 2018 20:11:12 +0000 (16:11 -0400)
src/ln/peer_handler.rs

index 5e9424243008e19768300475757bf07b17affbf8..f674b89fa23c4dd45a02c7da9304d84b65072679 100644 (file)
@@ -308,17 +308,22 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
                                                                                                                continue;
                                                                                                        },
                                                                                                        msgs::ErrorAction::DisconnectPeer { msg: _ } => {
+                                                                                                               //TODO: Try to push msg
+                                                                                                               log_trace!(self, "Got Err handling message, disconnecting peer because {}", e.err);
                                                                                                                return Err(PeerHandleError{ no_connection_possible: false });
                                                                                                        },
                                                                                                        msgs::ErrorAction::IgnoreError => {
+                                                                                                               log_trace!(self, "Got Err handling message, ignoring because {}", e.err);
                                                                                                                continue;
                                                                                                        },
                                                                                                        msgs::ErrorAction::SendErrorMessage { msg } => {
+                                                                                                               log_trace!(self, "Got Err handling message, sending Error message because {}", e.err);
                                                                                                                encode_and_send_msg!(msg, 17);
                                                                                                                continue;
                                                                                                        },
                                                                                                }
                                                                                        } else {
+                                                                                               log_debug!(self, "Got Err handling message, action not yet filled in: {}", e.err);
                                                                                                return Err(PeerHandleError{ no_connection_possible: false });
                                                                                        }
                                                                                }