Commit 6e49c91
committed
Track ChannelTransactionParameters in RevokedOutput
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 `RevokedOutput` 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 feb436f commit 6e49c91
2 files changed
+26
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3734 | 3734 | | |
3735 | 3735 | | |
3736 | 3736 | | |
3737 | | - | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | | - | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
3743 | 3740 | | |
3744 | 3741 | | |
3745 | 3742 | | |
| |||
3936 | 3933 | | |
3937 | 3934 | | |
3938 | 3935 | | |
3939 | | - | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
| 3936 | + | |
| 3937 | + | |
3943 | 3938 | | |
3944 | 3939 | | |
3945 | 3940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
| |||
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
151 | | - | |
| 160 | + | |
| 161 | + | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
| |||
161 | 171 | | |
162 | 172 | | |
163 | 173 | | |
164 | | - | |
| 174 | + | |
| 175 | + | |
165 | 176 | | |
166 | 177 | | |
167 | 178 | | |
| |||
780 | 791 | | |
781 | 792 | | |
782 | 793 | | |
783 | | - | |
784 | | - | |
| 794 | + | |
| 795 | + | |
785 | 796 | | |
786 | 797 | | |
787 | 798 | | |
| |||
1597 | 1608 | | |
1598 | 1609 | | |
1599 | 1610 | | |
1600 | | - | |
1601 | 1611 | | |
1602 | 1612 | | |
1603 | 1613 | | |
| |||
1635 | 1645 | | |
1636 | 1646 | | |
1637 | 1647 | | |
1638 | | - | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
1639 | 1653 | | |
1640 | 1654 | | |
1641 | 1655 | | |
| |||
0 commit comments