]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Log the error, when trying to forward the intercepted HTLC, but the
authorshaavan <shaavan.github@gmail.com>
Fri, 10 Nov 2023 12:50:16 +0000 (18:20 +0530)
committershaavan <shaavan.github@gmail.com>
Tue, 14 Nov 2023 09:41:09 +0000 (15:11 +0530)
channel is not found

lightning/src/ln/channelmanager.rs

index 76b7492fdcb45fb3d5a3e6e1ecd2ba52b6006eba..6bb19fd463d115c859a16742f811d8af11c4349a 100644 (file)
@@ -4185,10 +4185,14 @@ where
                                        err: format!("Channel with id {} for the passed counterparty node_id {} is still opening.",
                                                next_hop_channel_id, next_node_id)
                                }),
-                               None => return Err(APIError::ChannelUnavailable {
-                                       err: format!("Channel with id {} not found for the passed counterparty node_id {}",
-                                               next_hop_channel_id, next_node_id)
-                               })
+                               None => {
+                                       let error = format!("Channel with id {} not found for the passed counterparty node_id {}",
+                                               next_hop_channel_id, next_node_id);
+                                       log_error!(self.logger, "{} when attempting to forward intercepted HTLC", error);
+                                       return Err(APIError::ChannelUnavailable {
+                                               err: error
+                                       })
+                               }
                        }
                };