-
Notifications
You must be signed in to change notification settings - Fork 377
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
Expand #3313 test #3514
base: main
Are you sure you want to change the base?
Expand #3313 test #3514
Conversation
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.
Hi @TheBlueMatt ,
While trying to solve this issue, I ran into some questions and roadblocks. Would love to get your insights on these. Thanks!
// ??: The amount need to be modified to match the total amount received to bob, why? | ||
let amt_msat = nodes[0].node.list_usable_channels()[0].next_outbound_htlc_limit_msat + 1000; // Force MPP |
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.
It looks like the amt_msat
needed to be changed to ensure it matches the amt_msat
Bob receives. I’m not entirely sure why this change is required—would you happen to have any insights on why this might be happening?
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.
I believe this is because test_default_channel_config()
sets htlc_minimum_msat
to 1000 so it gets rounded up in the router. Probably fine to just make this change, for that reason.
match events[0] { | ||
Event::PaymentSent { .. } => {}, | ||
Event::PaymentPathFailed { .. } => panic!("Received PaymentPathFailed"), | ||
_ => panic!("Unexpected event") | ||
} |
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.
The test ran successfully, but instead of the payment going through, it actually fails. I’m not sure if this is due to how I designed the test or if it’s unexpected behaviour in the code. Any insights you could share would be super helpful. Thanks so much, Matt!
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.
IIRC, there needs to be a second channel opened between Alice and Bob so that Alice has a payment path to retry over. Will also need to adjust the Retry
passed to pay_for_offer
above.
Resolves #3320
This PR expands the test introduced in #3313 to include claiming the payment on-chain after Alice's node reloads. It ensures that, once we verify Alice's node does not reattempt paying a duplicate invoice, the payment process is also completed successfully.