Skip to content

Conversation

joostjager
Copy link
Contributor

It seems that because there wasn't a Clone bound on the Logger passed to ChannelManager, many of the methods of OutboundPayments saw a borrowed logger argument added, and still it wasn't possible to log everywhere. In debugging async payments, more trace statements would have been helpful, but they couldn't simply be added.

This PR initializes OutboundPayments with a Logger clone, and consequently simplifies method signatures.

The module is also in need of rustfmt, but won't do that now to avoid conflict with async payments.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 18, 2025

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a proper description to the commit?

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 86.23853% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.59%. Comparing base (07bf08b) to head (5fc6282).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/outbound_payment.rs 85.71% 12 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4082      +/-   ##
==========================================
- Coverage   88.60%   88.59%   -0.02%     
==========================================
  Files         176      176              
  Lines      132086   132070      -16     
  Branches   132086   132070      -16     
==========================================
- Hits       117041   117006      -35     
- Misses      12376    12397      +21     
+ Partials     2669     2667       -2     
Flag Coverage Δ
fuzzing 21.57% <6.17%> (+<0.01%) ⬆️
tests 88.43% <86.23%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Previously, OutboundPayments methods required borrowed logger
arguments since Logger lacked a Clone bound. This prevented
logging in all desired places, limiting trace statements for
debugging. This change initializes OutboundPayments with a
cloned Logger, simplifying method signatures and improving
logging flexibility.
@joostjager
Copy link
Contributor Author

joostjager commented Sep 18, 2025

Added commit msg

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough - landing this!

@tnull tnull merged commit 2e61d94 into lightningdevkit:main Sep 18, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants