From 17aad7adc19bba62bec132e950d1d322dc6874fe Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 6 Mar 2024 14:09:08 +0100 Subject: [PATCH] Allow to retrieve the `Node`'s `Config` --- bindings/ldk_node.udl | 1 + src/lib.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index c49c1fece..e325ae332 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -43,6 +43,7 @@ interface LDKNode { [Throws=NodeError] void stop(); NodeStatus status(); + Config config(); Event? next_event(); Event wait_next_event(); [Async] diff --git a/src/lib.rs b/src/lib.rs index 9b1d0d634..1abbece88 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -763,6 +763,11 @@ impl Node { } } + /// Returns the config with with the [`Node`] was configured. + pub fn config(&self) -> Config { + self.config.as_ref().clone() + } + /// Returns the next event in the event queue, if currently available. /// /// Will return `Some(..)` if an event is available and `None` otherwise.