]> git.bitcoin.ninja Git - rust-lightning/commit
Drop the `ChannelMonitorUpdateStatus::PermanentFailure` variant
authorMatt Corallo <git@bluematt.me>
Sun, 10 Sep 2023 17:14:32 +0000 (17:14 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 21 Sep 2023 19:04:05 +0000 (19:04 +0000)
commit23c5308bcbea61d89b1e5d3df6b6da721bc74c2a
tree29c931378a25f58a9341cc81b888c3746f406ac0
parentf2bb931ef98c38e681b35d0a3583fb65f0d463e0
Drop the `ChannelMonitorUpdateStatus::PermanentFailure` variant

When a `ChannelMonitorUpdate` fails to apply, it generally means
we cannot reach our storage backend. This, in general, is a
critical issue, but is often only a transient issue.

Sadly, users see the failure variant and return it on any I/O
error, resulting in channel force-closures due to transient issues.

Users don't generally expect force-closes in most cases, and
luckily with async `ChannelMonitorUpdate`s supported we don't take
any risk by "delaying" the `ChannelMonitorUpdate` indefinitely.

Thus, here we drop the `PermanentFailure` variant entirely, making
all failures instead be "the update is in progress, but won't ever
complete", which is equivalent if we do not close the channel
automatically.
12 files changed:
fuzz/src/chanmon_consistency.rs
lightning-persister/src/fs_store.rs
lightning/src/chain/chainmonitor.rs
lightning/src/chain/channelmonitor.rs
lightning/src/chain/mod.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/util/persist.rs
lightning/src/util/test_utils.rs