mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
pay: fix handling of legacy vs tlv encoding.
As revealed by the failure of tests in #3936, where we ended up trying to send a partial payment using legacy style, we are not handling style properly. 1. BOLT9 has features, so we can *know* that the destination supports MPP. We may not have seen a node_announcement. 2. We can't assume that nodes inside routehints support TLV. 3. We can't assume direct peers support TLV. The keysend code tried to fix this up, so I'm not sure that this caused the issue in #3968, though. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: `pay` will now make reliable multi-part payments to nodes it doesn't have a node_announcement for.
This commit is contained in:
@@ -169,6 +169,8 @@ struct payment {
|
||||
|
||||
/* Real destination we want to route to */
|
||||
struct node_id *destination;
|
||||
/* Do we know for sure that this supports OPT_VAR_ONION? */
|
||||
bool destination_has_tlv;
|
||||
|
||||
/* Payment hash extracted from the invoice if any. */
|
||||
struct sha256 *payment_hash;
|
||||
|
||||
Reference in New Issue
Block a user