Commit 05e5072
committed
Add total-MPP-value storage in pending payments
In some uses of LDK we need the ability to send HTLCs for only a
portion of some larger MPP payment. This allows payers to make
single payments which spend funds from multiple wallets, which may
be important for ecash wallets holding funds in multiple mints or
graduated wallets which hold funds across a trusted wallet and a
self-custodial wallet.
In the previous commits we moved the total-MPP-value we set in
onions from being manually passed through onion-building to passing
it via `RecipientOnionFields`. This introduced a subtle bug, though
- payments which are retried will get a fresh
`RecipientOnionFields` built from the data in
`PendingOutboundPayment::Retryable`, losing any custom
total-MPP-value settings and causing retries to fail.
Here we fix this by storing the total-MPP-value directly in
`PendingOutboundPayment::Retryable`.1 parent beb3059 commit 05e5072
1 file changed
+24
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
1650 | 1655 | | |
1651 | 1656 | | |
1652 | 1657 | | |
1653 | | - | |
| 1658 | + | |
1654 | 1659 | | |
1655 | 1660 | | |
1656 | 1661 | | |
| |||
1670 | 1675 | | |
1671 | 1676 | | |
1672 | 1677 | | |
1673 | | - | |
| 1678 | + | |
1674 | 1679 | | |
1675 | 1680 | | |
1676 | 1681 | | |
| |||
1986 | 1991 | | |
1987 | 1992 | | |
1988 | 1993 | | |
| 1994 | + | |
1989 | 1995 | | |
1990 | 1996 | | |
1991 | 1997 | | |
| |||
2693 | 2699 | | |
2694 | 2700 | | |
2695 | 2701 | | |
| 2702 | + | |
2696 | 2703 | | |
2697 | 2704 | | |
2698 | 2705 | | |
| |||
2775 | 2782 | | |
2776 | 2783 | | |
2777 | 2784 | | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
2778 | 2800 | | |
2779 | 2801 | | |
2780 | 2802 | | |
| |||
0 commit comments