Skip to content

Commit

Permalink
Expose node pub-key
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvank committed Nov 17, 2022
1 parent 1da6990 commit beecacf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct GetStatsRequest {}
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct GetStatsResponse {
pub social_profiles: SocialProfiles,
pub address: String,
pub height: u64,
pub nodes: usize,
pub power: u128,
Expand Down
1 change: 1 addition & 0 deletions src/node/api/get_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub async fn get_stats<B: Blockchain>(
let context = context.read().await;
Ok(GetStatsResponse {
social_profiles: context.social_profiles.clone(),
address: context.wallet.get_address().to_string(),
height: context.blockchain.get_height()?,
nodes: context.peer_manager.get_peers().len(),
power: context.blockchain.get_power()?,
Expand Down

0 comments on commit beecacf

Please sign in to comment.