Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ use bitcoin::BlockHash;
pub use bitcoin::FeeRate;
#[cfg(not(feature = "uniffi"))]
use bitcoin::FeeRate;
use bitcoin::{Address, Amount};
use bitcoin::{Address, Amount, Network};
#[cfg(feature = "uniffi")]
pub use builder::ArcedNodeBuilder as Builder;
pub use builder::BuildError;
Expand Down Expand Up @@ -761,6 +761,7 @@ impl Node {
/// Returns the status of the [`Node`].
pub fn status(&self) -> NodeStatus {
let is_running = *self.is_running.read().expect("lock");
let network = self.config.network;
let current_best_block = self.channel_manager.current_best_block().into();
let locked_node_metrics = self.node_metrics.read().expect("lock");
let latest_lightning_wallet_sync_timestamp =
Expand All @@ -778,6 +779,7 @@ impl Node {

NodeStatus {
is_running,
network,
current_best_block,
latest_lightning_wallet_sync_timestamp,
latest_onchain_wallet_sync_timestamp,
Expand Down Expand Up @@ -2079,6 +2081,8 @@ impl From<BlockLocator> for BestBlock {
pub struct NodeStatus {
/// Indicates whether the [`Node`] is running.
pub is_running: bool,
/// Network (e.g. mainnet, testnet4, signet) on which the [`Node`] is running.
pub network: Network,
/// The best block to which our Lightning wallet is currently synced.
pub current_best_block: BestBlock,
/// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced
Expand Down
Loading