Commit 4b09913
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 51b6064 commit 4b09913
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 | | |
| |||
823 | 834 | | |
824 | 835 | | |
825 | 836 | | |
826 | | - | |
827 | | - | |
| 837 | + | |
| 838 | + | |
828 | 839 | | |
829 | 840 | | |
830 | 841 | | |
| |||
1640 | 1651 | | |
1641 | 1652 | | |
1642 | 1653 | | |
1643 | | - | |
1644 | 1654 | | |
1645 | 1655 | | |
1646 | 1656 | | |
| |||
1678 | 1688 | | |
1679 | 1689 | | |
1680 | 1690 | | |
1681 | | - | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
1682 | 1696 | | |
1683 | 1697 | | |
1684 | 1698 | | |
| |||
0 commit comments