From: Matt Corallo Date: Tue, 2 Mar 2021 15:25:37 +0000 (-0500) Subject: Make IgnoringMessageHandler and ErroringMessageHandler pub X-Git-Tag: v0.0.13~6^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d039fc5cd1214a426e5714edfc0bd677cb2594b3;p=rust-lightning Make IgnoringMessageHandler and ErroringMessageHandler pub This is largely useful for bindings, and the off-github discussion around #814 concluded these should be pub, but the PR was not updated to capture this. Now that the bindings support generation for the structs, expose them. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index d37476327..db8bb4290 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -42,7 +42,7 @@ use bitcoin::hashes::{HashEngine, Hash}; /// A dummy struct which implements `RoutingMessageHandler` without storing any routing information /// or doing any processing. You can provide one of these as the route_handler in a MessageHandler. -struct IgnoringMessageHandler{} +pub struct IgnoringMessageHandler{} impl MessageSendEventsProvider for IgnoringMessageHandler { fn get_and_clear_pending_msg_events(&self) -> Vec { Vec::new() } } @@ -67,7 +67,7 @@ impl Deref for IgnoringMessageHandler { /// A dummy struct which implements `ChannelMessageHandler` without having any channels. /// You can provide one of these as the route_handler in a MessageHandler. -struct ErroringMessageHandler { +pub struct ErroringMessageHandler { message_queue: Mutex> } impl ErroringMessageHandler {