Skip to content

export send_onion_message_using_path for testing #2868

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

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

orbitalturtle
Copy link
Contributor

This is a small PR to export OnionMessenger's send_onion_message_using_path for testing. It can be turned on when the "_test_utils" feature is set. Context: We'd like to use this function in LNDK's tests and @jkczyz suggested this approach.

Copy link

coderabbitai bot commented Feb 2, 2024

Walkthrough

The update involves modifying the accessibility of the send_onion_message_using_path function within the messenger.rs file of the Lightning project. This function's visibility has been expanded from pub(super) to public, enhancing its accessibility for broader use, particularly in testing scenarios or when the _test_utils feature flag is activated.

Changes

File Path Change Summary
.../onion_message/messenger.rs Changed send_onion_message_using_path visibility from pub(super) to public

🐇✨
In the realm of code, under digital skies,
A function once hidden, now before our eyes.
From private to public, it leaps with grace,
A hop of progress, in the vast codebase.
🌟🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3751398 and 06f9dd7.
Files selected for processing (1)
  • lightning/src/onion_message/messenger.rs (1 hunks)
Additional comments: 1
lightning/src/onion_message/messenger.rs (1)
  • 810-811: The visibility change of send_onion_message_using_path to public under the _test_utils feature flag is correctly implemented. This change facilitates testing by allowing direct access to this function when the feature flag is enabled, without affecting the standard execution context.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5592378) 88.54% compared to head (06f9dd7) 90.41%.
Report is 51 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2868      +/-   ##
==========================================
+ Coverage   88.54%   90.41%   +1.86%     
==========================================
  Files         115      116       +1     
  Lines       92277   101841    +9564     
  Branches    92277   101841    +9564     
==========================================
+ Hits        81706    92076   +10370     
+ Misses       8068     7334     -734     
+ Partials     2503     2431      -72     

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

orbitalturtle added a commit to orbitalturtle/ldk-sample that referenced this pull request Feb 2, 2024
We upgrade to LDK v120 because we need the new blinded route features within.
On top of that we add the changes in a small PR we submitted, which we need in
order to send an onion message across along a specified path for LNDK's
integration tests: lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 2, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 2, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

This was the previous public interface, which we still use in testing, too.

@jkczyz jkczyz merged commit 7c94636 into lightningdevkit:main Feb 2, 2024
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 6, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 6, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/ldk-sample that referenced this pull request Feb 7, 2024
We upgrade to LDK v120 because we need the new blinded route features within.
On top of that we add the changes in a small PR we submitted, which we need in
order to send an onion message across along a specified path for LNDK's
integration tests: lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 7, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 8, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 8, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 8, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 8, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Feb 24, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Mar 6, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
orbitalturtle added a commit to lndk-org/lndk that referenced this pull request Mar 20, 2024
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
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