Skip to content

LSPS1: Service refactor - Part 1 #3864

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinsaposnic
Copy link
Contributor

Starting to work on this issue #3480

This is the first of (I think) many PRs with multiple refactors on LSPS1/service

In this PR:

  • Remove dead / unnecesary functions, dependencies, etc.
  • Add the first LSPS1 integration test.

There are no breaking API changes, ldk-node should keep functioning as usual

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jun 16, 2025

👋 Hi! This PR is now in draft status.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@ldk-reviews-bot ldk-reviews-bot requested a review from jkczyz June 16, 2025 15:10
@martinsaposnic martinsaposnic marked this pull request as draft June 16, 2025 15:38
@jkczyz jkczyz requested review from tnull and removed request for jkczyz June 16, 2025 16:30
- Remove dead / unnecesary functions, dependencies, etc.
- Add the first LSPS1 integration test.

There are no breaking API changes, ldk-node should function as usual
@martinsaposnic martinsaposnic force-pushed the lsps1-service-refactor-first-pass branch from 1febb34 to 27be2eb Compare June 17, 2025 14:13
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.73%. Comparing base (b5bfa85) to head (27be2eb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3864      +/-   ##
==========================================
- Coverage   89.75%   89.73%   -0.03%     
==========================================
  Files         164      164              
  Lines      132834   132832       -2     
  Branches   132834   132832       -2     
==========================================
- Hits       119229   119192      -37     
- Misses      10926    10951      +25     
- Partials     2679     2689      +10     

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

@martinsaposnic martinsaposnic marked this pull request as ready for review June 17, 2025 14:29
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.

Thanks! Might be good to hold work on this for a bit until we concluded the larger discussions around lightning-liquidity design.

So far mostly looks good though, but please keep the generics/references to ChainSource as we added them on purpose since they'll be needed when tracking onchain payments. AChannelManager might be more debatable, but probably can't hurt to leave the generics in place until we're certain we don't need them.

{
/// Constructs a `LSPS1ServiceHandler`.
pub(crate) fn new(
entropy_source: ES, pending_messages: Arc<MessageQueue>, pending_events: Arc<EventQueue>,
channel_manager: CM, chain_source: Option<C>, config: LSPS1ServiceConfig,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please leave these object references here, as we'll need them for when we implement tracking of on-chain payments.

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

@martinsaposnic martinsaposnic marked this pull request as draft June 18, 2025 13:10
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