Commit 7c56f21
committed
Cancel claims signed by a remote
In `ChannelMonitorImpl::cancel_prev_commitment_claims` we need to
cancel any claims against a removed commitment transaction. We
were checking if `holder_tx_signed` before checking if either the
current or previous holder commitment transaction had pending
claims against it, but (a) there's no need to do this, there's not
a big performance cost to just always trying to remove claims and
(b) we can't actually rely on `holder_tx_signed`.
`holder_tx_signed` being set doesn't necessarily imply that the
`ChannelMonitor` was persisted (i.e. it may simply be lost in a
poorly-timed restart) but we also (somewhat theoretically) allow
for multiple copies of a `ChannelMonitor` to exist, and a different
one could have signed the commitment transaction which was
confirmed (and then unconfirmed).
Thus, we simply remove the additional check here.ChannelMonitor when reorging1 parent 9d2449a commit 7c56f21
1 file changed
+19
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3874 | 3874 | | |
3875 | 3875 | | |
3876 | 3876 | | |
3877 | | - | |
3878 | | - | |
3879 | | - | |
3880 | | - | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
3881 | 3893 | | |
3882 | | - | |
3883 | | - | |
3884 | | - | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
3885 | 3897 | | |
3886 | 3898 | | |
3887 | 3899 | | |
3888 | 3900 | | |
3889 | 3901 | | |
3890 | 3902 | | |
3891 | | - | |
3892 | | - | |
3893 | | - | |
3894 | | - | |
3895 | | - | |
3896 | | - | |
3897 | | - | |
3898 | | - | |
3899 | | - | |
3900 | | - | |
3901 | | - | |
3902 | | - | |
3903 | | - | |
3904 | | - | |
3905 | | - | |
3906 | 3903 | | |
3907 | 3904 | | |
3908 | 3905 | | |
| |||
0 commit comments