Commit d2f2835
committed
Track ChannelTransactionParameters in HolderFundingOutput
The `ChannelMonitor` and `OnchainTxHandler` have historically been tied
together, often tracking some of the same state twice. As we introduce
support for splices in the `ChannelMonitor`, we'd like to avoid leaking
some of those details to the `OnchainTxHandler`. Ultimately, the
`OnchainTxHandler` should stand on its own and support claiming funds
from multiple `ChannelMonitor`s, allowing us to save on fees by batching
aggregatable claims across multiple in-flight closing channels.
Once splices are supported, we may run into cases where we are
attempting to claim an output from a specific `FundingScope`, while also
having an additional pending `FundingScope` for a splice. If the pending
splice confirms over the output claim, we need to cancel the claim and
re-offer it with the set of relevant parameters in the new
`FundingScope`.
This commit tracks the `ChannelTransactionParameters` for the specific
`FundingScope` the `HolderFundingOutput` claim originated from. This
allows us to remove the dependency on `OnchainTxHandler` when obtaining
the current `ChannelTransactionParameters` and ensures any alternative
state due to splicing does not leak into the `OnchainTxHandler`.1 parent b8ee823 commit d2f2835
File tree
3 files changed
+33
-14
lines changed- lightning/src/chain
3 files changed
+33
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3279 | 3279 | | |
3280 | 3280 | | |
3281 | 3281 | | |
3282 | | - | |
3283 | | - | |
3284 | | - | |
| 3282 | + | |
3285 | 3283 | | |
3286 | 3284 | | |
3287 | 3285 | | |
| |||
3533 | 3531 | | |
3534 | 3532 | | |
3535 | 3533 | | |
| 3534 | + | |
3536 | 3535 | | |
3537 | 3536 | | |
3538 | 3537 | | |
| |||
3547 | 3546 | | |
3548 | 3547 | | |
3549 | 3548 | | |
3550 | | - | |
3551 | | - | |
| 3549 | + | |
| 3550 | + | |
3552 | 3551 | | |
3553 | 3552 | | |
3554 | 3553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
693 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| |||
705 | 708 | | |
706 | 709 | | |
707 | 710 | | |
| 711 | + | |
708 | 712 | | |
709 | 713 | | |
710 | 714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
453 | | - | |
454 | | - | |
| 455 | + | |
455 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
456 | 460 | | |
457 | 461 | | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| 465 | + | |
461 | 466 | | |
462 | 467 | | |
463 | 468 | | |
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
467 | | - | |
| 472 | + | |
| 473 | + | |
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| |||
488 | 494 | | |
489 | 495 | | |
490 | 496 | | |
| 497 | + | |
491 | 498 | | |
492 | 499 | | |
493 | 500 | | |
| |||
500 | 507 | | |
501 | 508 | | |
502 | 509 | | |
| 510 | + | |
503 | 511 | | |
504 | 512 | | |
505 | 513 | | |
506 | 514 | | |
507 | 515 | | |
508 | 516 | | |
509 | 517 | | |
| 518 | + | |
510 | 519 | | |
511 | 520 | | |
512 | 521 | | |
| 522 | + | |
| 523 | + | |
513 | 524 | | |
514 | 525 | | |
515 | 526 | | |
516 | | - | |
517 | 527 | | |
| 528 | + | |
518 | 529 | | |
| 530 | + | |
519 | 531 | | |
520 | 532 | | |
521 | 533 | | |
| |||
1434 | 1446 | | |
1435 | 1447 | | |
1436 | 1448 | | |
1437 | | - | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1438 | 1452 | | |
1439 | 1453 | | |
1440 | 1454 | | |
| |||
1538 | 1552 | | |
1539 | 1553 | | |
1540 | 1554 | | |
| 1555 | + | |
| 1556 | + | |
1541 | 1557 | | |
1542 | | - | |
| 1558 | + | |
1543 | 1559 | | |
1544 | 1560 | | |
1545 | 1561 | | |
| |||
0 commit comments