We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents db1b7dc + 0a95d72 commit 0c13726Copy full SHA for 0c13726
2 files changed
bindings/ldk_node.udl
@@ -89,6 +89,7 @@ interface LDKNode {
89
[Throws=NodeError]
90
string sign_message([ByRef]sequence<u8> msg);
91
boolean verify_signature([ByRef]sequence<u8> msg, [ByRef]string sig, [ByRef]PublicKey pkey);
92
+ boolean is_running();
93
};
94
95
[Error]
src/lib.rs
@@ -708,6 +708,11 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
708
Ok(())
709
}
710
711
+ /// Returns whether the [`Node`] is running.
712
+ pub fn is_running(&self) -> bool {
713
+ self.runtime.read().unwrap().is_some()
714
+ }
715
+
716
/// Disconnects all peers, stops all running background tasks, and shuts down [`Node`].
717
///
718
/// After this returns most API methods will return [`Error::NotRunning`].
0 commit comments