Commit ed0bf36
committed
Cache pending offer in specific invoice slot
When we as an async recipient receive offer paths from the static invoice server,
we create an offer and cache it, retrying persisting a corresponding invoice with
the server until it succeeds.
In the initially-merged version of this protocol, we would put this cached
offer in any slot in the cache that needed an offer at the time the offer paths
were received. However, in the last commit we started requesting offer paths
for a specific slot in the cache, as part of eliminating the use of the
invoice_id field in the overall protocol.
As a result, here we put the cached offer in the specific cache slot that the
original OfferPathsRequest indicated, rather than any slot that could use a new
offer.1 parent 33291b6 commit ed0bf36
File tree
3 files changed
+65
-30
lines changed- lightning/src
- blinded_path
- offers
3 files changed
+65
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
451 | 459 | | |
452 | 460 | | |
453 | 461 | | |
| |||
573 | 581 | | |
574 | 582 | | |
575 | 583 | | |
| 584 | + | |
576 | 585 | | |
577 | 586 | | |
578 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
| |||
283 | 295 | | |
284 | 296 | | |
285 | 297 | | |
286 | | - | |
| 298 | + | |
287 | 299 | | |
288 | | - | |
| 300 | + | |
289 | 301 | | |
290 | 302 | | |
291 | 303 | | |
| |||
307 | 319 | | |
308 | 320 | | |
309 | 321 | | |
310 | | - | |
311 | | - | |
| 322 | + | |
| 323 | + | |
312 | 324 | | |
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
316 | 328 | | |
| 329 | + | |
317 | 330 | | |
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
321 | 334 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
335 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
336 | 348 | | |
337 | | - | |
338 | 349 | | |
339 | 350 | | |
340 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
341 | 367 | | |
342 | 368 | | |
343 | 369 | | |
| |||
377 | 403 | | |
378 | 404 | | |
379 | 405 | | |
380 | | - | |
381 | | - | |
382 | | - | |
| 406 | + | |
| 407 | + | |
383 | 408 | | |
384 | | - | |
385 | | - | |
| 409 | + | |
| 410 | + | |
386 | 411 | | |
387 | 412 | | |
388 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1276 | 1276 | | |
1277 | 1277 | | |
1278 | 1278 | | |
| 1279 | + | |
1279 | 1280 | | |
1280 | 1281 | | |
1281 | 1282 | | |
| |||
1444 | 1445 | | |
1445 | 1446 | | |
1446 | 1447 | | |
1447 | | - | |
1448 | | - | |
| 1448 | + | |
| 1449 | + | |
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
| 1453 | + | |
1452 | 1454 | | |
1453 | 1455 | | |
1454 | | - | |
| 1456 | + | |
1455 | 1457 | | |
1456 | 1458 | | |
1457 | 1459 | | |
| |||
1460 | 1462 | | |
1461 | 1463 | | |
1462 | 1464 | | |
| 1465 | + | |
1463 | 1466 | | |
1464 | 1467 | | |
1465 | 1468 | | |
| |||
1495 | 1498 | | |
1496 | 1499 | | |
1497 | 1500 | | |
1498 | | - | |
| 1501 | + | |
1499 | 1502 | | |
1500 | 1503 | | |
1501 | 1504 | | |
1502 | 1505 | | |
1503 | 1506 | | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1510 | 1511 | | |
1511 | 1512 | | |
1512 | 1513 | | |
| |||
0 commit comments