Skip to content

Commit

Permalink
Allow to retrieve the Node's Config
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Mar 6, 2024
1 parent 98f2c5a commit 764a73a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface LDKNode {
[Throws=NodeError]
void stop();
NodeStatus status();
Config config();
Event? next_event();
Event wait_next_event();
[Async]
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
}
}

/// Returns the config with which the [`Node`] was initialized.
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.
Expand Down

0 comments on commit 764a73a

Please sign in to comment.