Skip to content

Allow setting a payer_note on pay_for_offer_from_human_readable_name #3808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

elnosh
Copy link

@elnosh elnosh commented May 28, 2025

Closes #3780

Allows setting a payer_note on pay_for_offer_from_human_readable_name and added a similarly named field to the AwaitingOffer. When paying the offer, it will get the payer_note from params_for_payment_awaiting_offer.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented May 28, 2025

👋 Thanks for assigning @carlaKC 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.

@tnull tnull self-requested a review May 29, 2025 08:00
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.

Mostly looks good to me. Could we add some test coverage in lightning-dns-resolver's end_to_end_test to ensure this is working as expected?

Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

lgtm once @tnull's comments + request for a test are added 👍

elnosh added 2 commits May 29, 2025 11:31
pay_for_offer and pay_for_offer_from_human_readable_name
take RouteParametersConfig and not max_total_routing_fee_msat.
Copy link

codecov bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 95.87629% with 4 lines in your changes missing coverage. Please review.

Project coverage is 89.78%. Comparing base (c46d0df) to head (0f75233).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lightning-dns-resolver/src/lib.rs 96.62% 0 Missing and 3 partials ⚠️
lightning/src/ln/channelmanager.rs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3808      +/-   ##
==========================================
+ Coverage   89.73%   89.78%   +0.04%     
==========================================
  Files         159      159              
  Lines      128910   128993      +83     
  Branches   128910   128993      +83     
==========================================
+ Hits       115682   115810     +128     
+ Misses      10535    10485      -50     
- Partials     2693     2698       +5     

☔ 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.

@carlaKC carlaKC self-requested a review May 29, 2025 17:07
tnull added 3 commits May 30, 2025 11:38
.. as we'd otherwise never catch any bugs particular to the `dnssec`
feature.
.. and link all instances for consistency.
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.

LGTM

I took the liberty of pushing three additional commits to this PR branch that cleanup preexisting doc breakage/nits under the dnssec feature, and ensure we cargo test/check/doc lightning with dnssec in CI to make sure we catch such things going forward. (cc @TheBlueMatt)

@@ -405,7 +406,86 @@ mod test {
let params = RouteParametersConfig::default();
nodes[0]
.node
.pay_for_offer_from_human_readable_name(name, amt, payment_id, retry, params, resolvers)
.pay_for_offer_from_human_readable_name(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be okay for now because kinda pre-existing, but going forward we'll probably want to DRY up that test code instead of copy/pasting the same flow.

@elnosh
Copy link
Author

elnosh commented May 30, 2025

noted, thanks for the review! @tnull

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @TheBlueMatt @carlaKC! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

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.

HRN: Allow to set payer_note on ChannelManager::pay_for_offer_from_human_readable_name
4 participants