@@ -122,7 +122,7 @@ use bitcoin::BlockHash;
122122pub use bitcoin:: FeeRate ;
123123#[ cfg( not( feature = "uniffi" ) ) ]
124124use bitcoin:: FeeRate ;
125- use bitcoin:: { Address , Amount } ;
125+ use bitcoin:: { Address , Amount , Network } ;
126126#[ cfg( feature = "uniffi" ) ]
127127pub use builder:: ArcedNodeBuilder as Builder ;
128128pub use builder:: BuildError ;
@@ -761,6 +761,7 @@ impl Node {
761761 /// Returns the status of the [`Node`].
762762 pub fn status ( & self ) -> NodeStatus {
763763 let is_running = * self . is_running . read ( ) . expect ( "lock" ) ;
764+ let network = self . config . network ;
764765 let current_best_block = self . channel_manager . current_best_block ( ) . into ( ) ;
765766 let locked_node_metrics = self . node_metrics . read ( ) . expect ( "lock" ) ;
766767 let latest_lightning_wallet_sync_timestamp =
@@ -778,6 +779,7 @@ impl Node {
778779
779780 NodeStatus {
780781 is_running,
782+ network,
781783 current_best_block,
782784 latest_lightning_wallet_sync_timestamp,
783785 latest_onchain_wallet_sync_timestamp,
@@ -2079,6 +2081,8 @@ impl From<BlockLocator> for BestBlock {
20792081pub struct NodeStatus {
20802082 /// Indicates whether the [`Node`] is running.
20812083 pub is_running : bool ,
2084+ /// Network (e.g. mainnet, testnet4, signet) on which the [`Node`] is running.
2085+ pub network : Network ,
20822086 /// The best block to which our Lightning wallet is currently synced.
20832087 pub current_best_block : BestBlock ,
20842088 /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced
0 commit comments