From d9d39df21a2e2628e3396a5ace9f50577d76a401 Mon Sep 17 00:00:00 2001 From: Peter Neuroth Date: Fri, 3 Jan 2025 12:05:12 +0100 Subject: [PATCH] tramp: Add additional log messages Adding log messages for success/failure of a trampoline payment. --- libs/gl-plugin/src/node/mod.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/libs/gl-plugin/src/node/mod.rs b/libs/gl-plugin/src/node/mod.rs index 2a4cda6e3..ac43fd51d 100644 --- a/libs/gl-plugin/src/node/mod.rs +++ b/libs/gl-plugin/src/node/mod.rs @@ -573,16 +573,22 @@ impl Node for PluginNodeServer { res, ) }) { - Ok(res) => Ok(tonic::Response::new(pb::TrampolinePayResponse { - payment_preimage: res.payment_preimage, - payment_hash: res.payment_hash, - created_at: res.created_at, - parts: res.parts, - amount_msat: res.amount_msat.unwrap_or_default().msat, - amount_sent_msat: res.amount_sent_msat.unwrap_or_default().msat, - destination: res.destination.unwrap_or_default(), - })), - Err(e) => Err(Status::new(Code::Unknown, e.to_string())), + Ok(res) => { + debug!("Trampoline payment successful"); + Ok(tonic::Response::new(pb::TrampolinePayResponse { + payment_preimage: res.payment_preimage, + payment_hash: res.payment_hash, + created_at: res.created_at, + parts: res.parts, + amount_msat: res.amount_msat.unwrap_or_default().msat, + amount_sent_msat: res.amount_sent_msat.unwrap_or_default().msat, + destination: res.destination.unwrap_or_default(), + })) + } + Err(e) => { + debug!("Trampoline payment failed: {}", e); + Err(Status::new(Code::Unknown, e.to_string())) + } } } }