]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Ensure handle_announcement_signatures always has a ErrorAction
authorMatt Corallo <git@bluematt.me>
Thu, 30 Aug 2018 20:49:51 +0000 (16:49 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 31 Aug 2018 21:00:44 +0000 (17:00 -0400)
src/ln/channelmanager.rs

index 9e3074bb65a000fd8ef2a5c864a75704791b19d5..b2f2347b4989086b4b07b5ad621bff024fee2389 100644 (file)
@@ -1988,10 +1988,10 @@ impl ChannelMessageHandler for ChannelManager {
                        match channel_state.by_id.get_mut(&msg.channel_id) {
                                Some(chan) => {
                                        if chan.get_their_node_id() != *their_node_id {
-                                               return Err(HandleError{err: "Got a message for a channel from the wrong node!", action: None})
+                                               return Err(HandleError{err: "Got a message for a channel from the wrong node!", action: Some(msgs::ErrorAction::IgnoreError) })
                                        }
                                        if !chan.is_usable() {
-                                               return Err(HandleError{err: "Got an announcement_signatures before we were ready for it", action: None });
+                                               return Err(HandleError{err: "Got an announcement_signatures before we were ready for it", action: Some(msgs::ErrorAction::IgnoreError) });
                                        }
 
                                        let our_node_id = self.get_our_node_id();
@@ -2013,7 +2013,7 @@ impl ChannelMessageHandler for ChannelManager {
                                                contents: announcement,
                                        }, self.get_channel_update(chan).unwrap()) // can only fail if we're not in a ready state
                                },
-                               None => return Err(HandleError{err: "Failed to find corresponding channel", action: None})
+                               None => return Err(HandleError{err: "Failed to find corresponding channel", action: Some(msgs::ErrorAction::IgnoreError)})
                        }
                };
                let mut pending_events = self.pending_events.lock().unwrap();