Make IgnoringMessageHandler and ErroringMessageHandler pub
authorMatt Corallo <git@bluematt.me>
Tue, 2 Mar 2021 15:25:37 +0000 (10:25 -0500)
committerMatt Corallo <git@bluematt.me>
Sun, 7 Mar 2021 18:06:07 +0000 (13:06 -0500)
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.

lightning/src/ln/peer_handler.rs

index d37476327ba02750a34f2fa0e8a8bce0dc62a167..db8bb4290219d4f7615117d22839e28110ab90c6 100644 (file)
@@ -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<MessageSendEvent> { 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<Vec<MessageSendEvent>>
 }
 impl ErroringMessageHandler {