Commit e989989
committed
Refactor: unify invoice builder response paths (remove
This refactor removes the separate `respond_with` / `respond_with_no_std`
variants and replaces them with a single unified
`respond_using_derived_keys(created_at)` API.
Reasoning:
- Upcoming recurrence logic requires setting `invoice_recurrence_basetime`
based on the invoice’s `created_at` timestamp.
- For consistency with Offer and Refund builders, we want a single method
that accepts an explicit `created_at` value at the callsite.
- The only real difference between the std/no_std response paths was how
`created_at` was sourced; once it becomes a parameter, the split becomes
unnecessary.
This change consolidates the response flow, reduces API surface, and
makes future recurrence-related changes simpler and more uniform across
Offer, InvoiceRequest, and Refund builders.respond_with* split)1 parent 0186e7c commit e989989
File tree
7 files changed
+87
-202
lines changed- lightning/src
- ln
- offers
7 files changed
+87
-202
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13236 | 13236 | | |
13237 | 13237 | | |
13238 | 13238 | | |
| 13239 | + | |
| 13240 | + | |
| 13241 | + | |
| 13242 | + | |
| 13243 | + | |
| 13244 | + | |
| 13245 | + | |
13239 | 13246 | | |
13240 | 13247 | | |
13241 | 13248 | | |
| |||
13245 | 13252 | | |
13246 | 13253 | | |
13247 | 13254 | | |
| 13255 | + | |
13248 | 13256 | | |
13249 | 13257 | | |
13250 | 13258 | | |
| |||
15407 | 15415 | | |
15408 | 15416 | | |
15409 | 15417 | | |
| 15418 | + | |
| 15419 | + | |
| 15420 | + | |
| 15421 | + | |
| 15422 | + | |
| 15423 | + | |
| 15424 | + | |
15410 | 15425 | | |
15411 | 15426 | | |
15412 | 15427 | | |
| |||
15422 | 15437 | | |
15423 | 15438 | | |
15424 | 15439 | | |
| 15440 | + | |
15425 | 15441 | | |
15426 | 15442 | | |
15427 | 15443 | | |
| |||
15446 | 15462 | | |
15447 | 15463 | | |
15448 | 15464 | | |
| 15465 | + | |
15449 | 15466 | | |
15450 | 15467 | | |
15451 | 15468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2337 | 2337 | | |
2338 | 2338 | | |
2339 | 2339 | | |
2340 | | - | |
| 2340 | + | |
2341 | 2341 | | |
2342 | 2342 | | |
2343 | 2343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3206 | 3206 | | |
3207 | 3207 | | |
3208 | 3208 | | |
3209 | | - | |
| 3209 | + | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | 3212 | | |
| |||
3253 | 3253 | | |
3254 | 3254 | | |
3255 | 3255 | | |
3256 | | - | |
| 3256 | + | |
3257 | 3257 | | |
3258 | 3258 | | |
3259 | 3259 | | |
| |||
3316 | 3316 | | |
3317 | 3317 | | |
3318 | 3318 | | |
3319 | | - | |
| 3319 | + | |
3320 | 3320 | | |
3321 | 3321 | | |
3322 | 3322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
935 | | - | |
| 935 | + | |
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| |||
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
966 | | - | |
967 | 966 | | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | 967 | | |
979 | 968 | | |
980 | 969 | | |
| |||
1001 | 990 | | |
1002 | 991 | | |
1003 | 992 | | |
1004 | | - | |
| 993 | + | |
1005 | 994 | | |
1006 | 995 | | |
1007 | 996 | | |
| |||
1030 | 1019 | | |
1031 | 1020 | | |
1032 | 1021 | | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1022 | + | |
| 1023 | + | |
1042 | 1024 | | |
1043 | 1025 | | |
1044 | 1026 | | |
| |||
1061 | 1043 | | |
1062 | 1044 | | |
1063 | 1045 | | |
1064 | | - | |
| 1046 | + | |
1065 | 1047 | | |
1066 | 1048 | | |
1067 | 1049 | | |
| |||
1090 | 1072 | | |
1091 | 1073 | | |
1092 | 1074 | | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
| 1075 | + | |
| 1076 | + | |
1103 | 1077 | | |
1104 | 1078 | | |
1105 | 1079 | | |
| |||
0 commit comments