]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add second TODO when claiming to mirror the existing TODO on claim fail 2022-11-claim-relock
authorMatt Corallo <git@bluematt.me>
Tue, 6 Dec 2022 21:19:29 +0000 (21:19 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 8 Dec 2022 21:24:26 +0000 (21:24 +0000)
lightning/src/ln/channelmanager.rs

index d20569df0464c2952c85fd134669eeb1055abaf6..0d09ead3aca950ac0f409f28db5dfe95088a5d37 100644 (file)
@@ -4425,6 +4425,10 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
                                        match self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update) {
                                                ChannelMonitorUpdateStatus::Completed => {},
                                                e => {
+                                                       // TODO: This needs to be handled somehow - if we receive a monitor update
+                                                       // with a preimage we *must* somehow manage to propagate it to the upstream
+                                                       // channel, or we must have an ability to receive the same update and try
+                                                       // again on restart.
                                                        log_given_level!(self.logger, if e == ChannelMonitorUpdateStatus::PermanentFailure { Level::Error } else { Level::Info },
                                                                "Failed to update channel monitor with preimage {:?} immediately prior to force-close: {:?}",
                                                                payment_preimage, e);