X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Ftest_utils.rs;h=476c9e5741dd19bb296eeb108daa35db6332de8a;hb=e0fad3f8a36ccdd9add2a327041d28ddf2ccaecf;hp=aff84735ece7e6a15355a1ef7710b80b97d8de9c;hpb=03c6f84aa82e04c20692f01303bb9eaf6fde4411;p=rust-lightning diff --git a/src/util/test_utils.rs b/src/util/test_utils.rs index aff84735..476c9e57 100644 --- a/src/util/test_utils.rs +++ b/src/util/test_utils.rs @@ -68,7 +68,6 @@ impl TestChannelMessageHandler { } impl msgs::ChannelMessageHandler for TestChannelMessageHandler { - fn handle_open_channel(&self, _their_node_id: &PublicKey, _msg: &msgs::OpenChannel) -> Result { Err(HandleError { err: "", action: None }) } @@ -114,7 +113,14 @@ impl msgs::ChannelMessageHandler for TestChannelMessageHandler { fn handle_announcement_signatures(&self, _their_node_id: &PublicKey, _msg: &msgs::AnnouncementSignatures) -> Result<(), HandleError> { Err(HandleError { err: "", action: None }) } + fn handle_channel_reestablish(&self, _their_node_id: &PublicKey, _msg: &msgs::ChannelReestablish) -> Result<(Option, Option, Option), HandleError> { + Err(HandleError { err: "", action: None }) + } fn peer_disconnected(&self, _their_node_id: &PublicKey, _no_connection_possible: bool) {} + fn peer_connected(&self, _their_node_id: &PublicKey) -> Vec { + Vec::new() + } + fn handle_error(&self, _their_node_id: &PublicKey, _msg: &msgs::ErrorMessage) {} } impl events::EventsProvider for TestChannelMessageHandler { @@ -135,13 +141,13 @@ impl TestRoutingMessageHandler { } impl msgs::RoutingMessageHandler for TestRoutingMessageHandler { - fn handle_node_announcement(&self, _msg: &msgs::NodeAnnouncement) -> Result<(), HandleError> { + fn handle_node_announcement(&self, _msg: &msgs::NodeAnnouncement) -> Result { Err(HandleError { err: "", action: None }) } fn handle_channel_announcement(&self, _msg: &msgs::ChannelAnnouncement) -> Result { Err(HandleError { err: "", action: None }) } - fn handle_channel_update(&self, _msg: &msgs::ChannelUpdate) -> Result<(), HandleError> { + fn handle_channel_update(&self, _msg: &msgs::ChannelUpdate) -> Result { Err(HandleError { err: "", action: None }) } fn handle_htlc_fail_channel_update(&self, _update: &msgs::HTLCFailChannelUpdate) {}