Skip to content

Commit

Permalink
tramp: Add additional log messages
Browse files Browse the repository at this point in the history
Adding log messages for success/failure of a trampoline payment.
  • Loading branch information
nepet authored and cdecker committed Jan 4, 2025
1 parent 883ef3b commit d9d39df
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions libs/gl-plugin/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
}
}
}
Expand Down

0 comments on commit d9d39df

Please sign in to comment.