-
Notifications
You must be signed in to change notification settings - Fork 414
Enable Creation of Offers and Refunds Without Blinded Path #3246
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
10
commits into
lightningdevkit:main
Choose a base branch
from
shaavan: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.
+630
−319
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cd298aa
Fixup: Remove stale documentation
shaavan 0e83dad
Fix: Ignore SCIDs when creating full-length blinded paths
shaavan 8e57c72
Update `create_blinded_paths` to accept `Vec<MessageForwardNode>`
shaavan 0d96cc6
Introduce `NodeIdMessageRouter` and `NullMessageRouter`
shaavan 6b4181f
Refactor: Update TestMessageRouter to enum
shaavan d474190
Update `DefaultMessageRouter` to always create compact blinded paths
shaavan 1bb6051
Update `create_offer_builder` to use `create_blinded_paths`
shaavan 8b2634b
Update `create_refund_builder` to use `create_blinded_paths`
shaavan dd131ef
Cleanup: Remove redundant `create_blinded_paths` variants
shaavan 40ae7a0
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
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.
Uh oh!
There was an error while loading. Please reload this page.