Expose BOLT11 underpayment sends#939
Conversation
|
👋 Thanks for assigning @tnull as a reviewer! |
|
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
tnull
left a comment
There was a problem hiding this comment.
Few comments, but generally looks good. What will be the BOLT12 story for partial payments?
| node.sync_wallets().unwrap(); | ||
| } | ||
|
|
||
| expect_channel_ready_event!(node_c, node_a.node_id()); |
There was a problem hiding this comment.
This is flaky:
thread 'split_underpaid_bolt11_payment' (63174) panicked at tests/integration_tests_rust.rs:358:5:
assertionleft == rightfailed
left: Some(PublicKey(188a7ccb0c94bfc5d135a2fcc02a37cca78d4c2c98f72912990ed0e594f5b765547537a41c32c32a0c87302c2d6ced61f6033d2b7c2e4109bb45c29b41439326))
right: Some(PublicKey(8cfa601d1be90d36097200793e66c50ac90b4836998149d5b04fc13caaadad08a5e6fa0651778c0eaa5826c52112c8aef2dd211b8fd92efff371063335858396))
note: run withRUST_BACKTRACE=1environment variable to display a backtrace
There was a problem hiding this comment.
fixed, needed to use expect_channel_ready_events because the ordering for the two channel ready events is ~random
| premine_and_distribute_funds( | ||
| &bitcoind.client, | ||
| &electrsd.client, | ||
| vec![addr_c], |
There was a problem hiding this comment.
If you only fund the one node, the others should reject incoming channels due to lack of reserves. This will have you fall back to staticremotekey, likely also fueling the flake below.
|
Share the common BOLT11 payment send flow between fixed-amount and explicit-amount sends so follow-up API variants can reuse the same payment-store and error handling path. AI-Tool-Disclosure: Created with OpenAI Codex.
Add a BOLT11 payment API for sending less than the invoice amount while using the invoice amount as the declared total MPP value. Cover the path with an integration test where two nodes each pay half of one invoice and the receiver claims the full amount. AI-Tool-Disclosure: Created with OpenAI Codex.
f8cdad5 to
d3faf8e
Compare
Needed for orange-sdk
Add a BOLT11 payment API for sending less than the invoice amount while
using the invoice amount as the declared total MPP value. Cover the path
with an integration test where two nodes each pay half of one invoice and
the receiver claims the full amount.
Did a refactor before to clean up and unify the bolt11 send functions.