File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ interface LDKNode {
89
89
[Throws=NodeError]
90
90
string sign_message([ByRef]sequence<u8> msg);
91
91
boolean verify_signature([ByRef]sequence<u8> msg, [ByRef]string sig, [ByRef]PublicKey pkey);
92
+ boolean is_running();
92
93
};
93
94
94
95
[Error]
Original file line number Diff line number Diff line change @@ -708,6 +708,11 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
708
708
Ok ( ( ) )
709
709
}
710
710
711
+ /// Returns whether the [`Node`] is running.
712
+ pub fn is_running ( & self ) -> bool {
713
+ self . runtime . read ( ) . unwrap ( ) . is_some ( )
714
+ }
715
+
711
716
/// Disconnects all peers, stops all running background tasks, and shuts down [`Node`].
712
717
///
713
718
/// After this returns most API methods will return [`Error::NotRunning`].
You can’t perform that action at this time.
0 commit comments