From d255d91a2ade4a9c8c90fe8c02a7f732beee7c40 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 5 Apr 2021 16:23:13 -0400 Subject: [PATCH] Log the node generating an onion error --- lightning/src/ln/onion_utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 1c45da14a..8feef1697 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -449,10 +449,10 @@ pub(super) fn process_onion_failure(secp_ctx: & let (description, title) = errors::get_onion_error_description(error_code); if debug_field_size > 0 && err_packet.failuremsg.len() >= 4 + debug_field_size { - log_warn!(logger, "Onion Error[{}({:#x}) {}({})] {}", title, error_code, debug_field, log_bytes!(&err_packet.failuremsg[4..4+debug_field_size]), description); + log_warn!(logger, "Onion Error[from {}: {}({:#x}) {}({})] {}", route_hop.pubkey, title, error_code, debug_field, log_bytes!(&err_packet.failuremsg[4..4+debug_field_size]), description); } else { - log_warn!(logger, "Onion Error[{}({:#x})] {}", title, error_code, description); + log_warn!(logger, "Onion Error[from {}: {}({:#x})] {}", route_hop.pubkey, title, error_code, description); } } else { // Useless packet that we can't use but it passed HMAC, so it -- 2.39.5