Commit b67ef21
committed
Introduce
This commit adds a minimal state tracker in `ChannelManager` for handling
inbound recurring BOLT12 payments. Each entry records the payer’s
recurrence progress (offset, next expected counter, and basetime), giving
the payee enough information to validate successive `invoice_request`s
and produce consistent invoices.
LDK inbound payments have historically been fully stateless. Introducing
a stateful mechanism here is a deliberate PoC choice to make recurrence
behavior correct and testable end-to-end. For production, we may instead
push this state to the user layer, or provide hooks so nodes can manage
their own recurrence state externally.
For now, this internal tracker gives us a clear foundation to build and
evaluate the recurrence flow.active_recurrence_sessions (PoC state tracker)1 parent 4d5e3ea commit b67ef21
2 files changed
+67
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
2671 | 2671 | | |
2672 | 2672 | | |
2673 | 2673 | | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
2674 | 2688 | | |
2675 | 2689 | | |
2676 | 2690 | | |
| |||
3960 | 3974 | | |
3961 | 3975 | | |
3962 | 3976 | | |
| 3977 | + | |
| 3978 | + | |
3963 | 3979 | | |
3964 | 3980 | | |
3965 | 3981 | | |
| |||
17285 | 17301 | | |
17286 | 17302 | | |
17287 | 17303 | | |
| 17304 | + | |
17288 | 17305 | | |
17289 | 17306 | | |
17290 | 17307 | | |
| |||
17303 | 17320 | | |
17304 | 17321 | | |
17305 | 17322 | | |
| 17323 | + | |
17306 | 17324 | | |
17307 | 17325 | | |
17308 | 17326 | | |
| |||
18197 | 18215 | | |
18198 | 18216 | | |
18199 | 18217 | | |
| 18218 | + | |
| 18219 | + | |
18200 | 18220 | | |
18201 | 18221 | | |
18202 | 18222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
862 | 908 | | |
863 | 909 | | |
864 | 910 | | |
| |||
0 commit comments