Commit 8fedde7
committed
Add PaymentMetadata and integrate it with PaymentDetail
- Introduces the `PaymentMetadata` struct with a randomly generated 16-byte ID ([u8; 16]), lighter than the 32-byte ID used in `PaymentDetail`.
- Adds a pointer from `PaymentDetail` to `PaymentMetadata`, available only for `PaymentKind::Bolt11`, `PaymentKind::Bolt12Offer` and `PaymentKind::Bolt12Refund` .
- For `Bolt11`, the metadata reference is an `Option<PaymentMetadataId>`.
- For `Bolt12Refund` and `Bolt12Offer`, it's a `Vec<PaymentMetadataId>`, allowing multiple metadata entries per detail.1 parent 7977b04 commit 8fedde7
File tree
5 files changed
+487
-10
lines changed- src
- payment
- tests
5 files changed
+487
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
748 | 749 | | |
749 | 750 | | |
750 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
| 320 | + | |
318 | 321 | | |
319 | 322 | | |
320 | 323 | | |
| |||
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| 345 | + | |
342 | 346 | | |
343 | 347 | | |
344 | 348 | | |
| |||
573 | 577 | | |
574 | 578 | | |
575 | 579 | | |
| 580 | + | |
576 | 581 | | |
577 | 582 | | |
578 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| |||
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| |||
334 | 338 | | |
335 | 339 | | |
336 | 340 | | |
| 341 | + | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
| |||
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
| 408 | + | |
403 | 409 | | |
404 | 410 | | |
405 | 411 | | |
| |||
0 commit comments