]> git.bitcoin.ninja Git - rust-lightning/commit
Handle Persister returning TemporaryFailure for new channels
authorMatt Corallo <git@bluematt.me>
Fri, 8 Oct 2021 20:40:34 +0000 (20:40 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 14 Oct 2021 00:19:12 +0000 (00:19 +0000)
commit1b6a7c1314a3840f57af4457977a5c98a864edd1
treea8dd2c4e4d25e29965f9511be75228be7b933963
parent49dbabff2701c3a5edb89b1d80c9cf9aed24af98
Handle Persister returning TemporaryFailure for new channels

Previously, if a Persister returned a TemporaryFailure error when
we tried to persist a new channel, the ChainMonitor wouldn't track
the new ChannelMonitor at all, generating a PermanentFailure later
when the updating is restored.

This fixes that by correctly storing the ChannelMonitor on
TemporaryFailures, allowing later update restoration to happen
normally.

This is (indirectly) tested in the next commit where we use
Persister to return all monitor-update errors.
lightning/src/chain/chainmonitor.rs