HTLC Failure message handling
[rust-lightning] / src / ln / peer_handler.rs
index d7b1e9d691238f34161c53d6c0e1eebf5ba35606..624c6494930dec39060b0119a933c4a81eaf1c7a 100644 (file)
@@ -424,7 +424,10 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
                                                                                        },
                                                                                        131 => {
                                                                                                let msg = try_potential_decodeerror!(msgs::UpdateFailHTLC::decode(&msg_data[2..]));
-                                                                                               try_potential_handleerror!(self.message_handler.chan_handler.handle_update_fail_htlc(&peer.their_node_id.unwrap(), &msg));
+                                                                                               let chan_update = try_potential_handleerror!(self.message_handler.chan_handler.handle_update_fail_htlc(&peer.their_node_id.unwrap(), &msg));
+                                                                                               if let Some(update) = chan_update {
+                                                                                                       self.message_handler.route_handler.handle_htlc_fail_channel_update(&update);
+                                                                                               }
                                                                                        },
                                                                                        135 => {
                                                                                                let msg = try_potential_decodeerror!(msgs::UpdateFailMalformedHTLC::decode(&msg_data[2..]));