Skip to content

Commit

Permalink
Add logging for successful/failed probes
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Jun 30, 2022
1 parent ea39853 commit 637f2f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lightning-invoice/src/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,10 @@ where
// handler.
if self.payer.payment_is_probe(*payment_hash, *payment_id) {
if *rejected_by_dest {
log_trace!(self.logger, "Probe {} was successful", log_bytes!(payment_hash.0));
self.scorer.lock().probe_successful(&path);
} else {
log_trace!(self.logger, "Probe {} failed at channel {}", log_bytes!(payment_hash.0), *short_channel_id);
self.scorer.lock().probe_failed(&path, *short_channel_id);
}
return;
Expand Down

0 comments on commit 637f2f3

Please sign in to comment.