forked from lightningdevkit/rust-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
No Blinded Path Offer (Review Branch) #1
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
shaavan
wants to merge
9
commits into
main
Choose a base branch
from
review-blinded_api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b00ec2f
Fix: Ignore SCIDs when creating full-length blinded paths
shaavan 71dcf21
Update `create_blinded_paths` to accept `Vec<MessageForwardNode>`
shaavan 8401798
Introduce `NodeIdMessageRouter` and `NullMessageRouter`
shaavan ecfb791
refactor: Update TestMessageRouter to enum
shaavan 4ad61c7
Update `DefaultMessageRouter` to always create compact blinded paths
shaavan 405736d
Update `create_offer_builder` to use `create_blinded_paths`
shaavan 13855b8
Update `create_refund_builder` to use `create_blinded_paths`
shaavan 86c000d
Cleanup: Remove redundant `create_blinded_paths` variants
shaavan 62d056b
Test: Add coverage for Offers and Refunds without blinded paths
shaavan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,7 +159,9 @@ mod test { | |
use bitcoin::secp256k1::{self, PublicKey, Secp256k1}; | ||
use bitcoin::Block; | ||
|
||
use lightning::blinded_path::message::{BlindedMessagePath, MessageContext}; | ||
use lightning::blinded_path::message::{ | ||
BlindedMessagePath, MessageContext, MessageForwardNode, | ||
}; | ||
use lightning::blinded_path::NodeIdLookUp; | ||
use lightning::events::{Event, PaymentPurpose}; | ||
use lightning::ln::channelmanager::{PaymentId, Retry}; | ||
|
@@ -230,7 +232,7 @@ mod test { | |
} | ||
|
||
fn create_blinded_paths<T: secp256k1::Signing + secp256k1::Verification>( | ||
&self, recipient: PublicKey, context: MessageContext, _peers: Vec<PublicKey>, | ||
&self, recipient: PublicKey, context: MessageContext, _peers: Vec<MessageForwardNode>, | ||
secp_ctx: &Secp256k1<T>, | ||
) -> Result<Vec<BlindedMessagePath>, ()> { | ||
let keys = KeysManager::new(&[0; 32], 42, 43); | ||
|
@@ -454,7 +456,7 @@ mod test { | |
#[tokio::test] | ||
async fn end_to_end_test() { | ||
let chanmon_cfgs = create_chanmon_cfgs(2); | ||
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs); | ||
let node_cfgs = create_node_cfgs_with_node_id_message_router(2, &chanmon_cfgs); | ||
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]); | ||
let nodes = create_network(2, &node_cfgs, &node_chanmgrs); | ||
|
||
|
@@ -480,7 +482,7 @@ mod test { | |
|
||
let name = HumanReadableName::from_encoded("[email protected]").unwrap(); | ||
|
||
let bs_offer = nodes[1].node.create_offer_builder(None).unwrap().build().unwrap(); | ||
let bs_offer = nodes[1].node.create_offer_builder().unwrap().build().unwrap(); | ||
let resolvers = vec![Destination::Node(resolver_id)]; | ||
let retry = Retry::Attempts(0); | ||
let amt = 42_000; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammatical error in documentation.
Apply this diff to fix the typo:
📝 Committable suggestion
🤖 Prompt for AI Agents