]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Always persist the `ChannelManager` on a failed ChannelUpdate
authorMatt Corallo <git@bluematt.me>
Thu, 24 Aug 2023 19:57:45 +0000 (19:57 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 12 Sep 2023 19:06:34 +0000 (19:06 +0000)
If we receive a `ChannelUpdate` message which was invalid, it can
cause us to force-close the channel, which should result in a
`ChannelManager` persistence, though its not critical to do so.

lightning/src/ln/channelmanager.rs

index 1df6db7dbd64d540b244a3a92a35967f25a02ae2..5e9b53606517f5d1d3564a068e580e50b80fb152 100644 (file)
@@ -7668,7 +7668,7 @@ where
                        if let Ok(persist) = handle_error!(self, self.internal_channel_update(counterparty_node_id, msg), *counterparty_node_id) {
                                persist
                        } else {
-                               NotifyOption::SkipPersistNoEvents
+                               NotifyOption::DoPersist
                        }
                });
        }