Commit 1f0e69d
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 c9fd3a5 commit 1f0e69d
1 file changed
+19
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3915 | 3915 | | |
3916 | 3916 | | |
3917 | 3917 | | |
3918 | | - | |
3919 | | - | |
3920 | | - | |
3921 | | - | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
3922 | 3934 | | |
3923 | | - | |
3924 | | - | |
3925 | | - | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
3926 | 3938 | | |
3927 | 3939 | | |
3928 | 3940 | | |
3929 | 3941 | | |
3930 | 3942 | | |
3931 | 3943 | | |
3932 | | - | |
3933 | | - | |
3934 | | - | |
3935 | | - | |
3936 | | - | |
3937 | | - | |
3938 | | - | |
3939 | | - | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | 3944 | | |
3948 | 3945 | | |
3949 | 3946 | | |
| |||
0 commit comments