Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
feat(age): add age getter API
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoga07 authored and maqi committed Nov 23, 2020
1 parent 1823023 commit 07430a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ impl Routing {
Ok((routing, event_stream))
}

/// Returns the current age of this node.
pub async fn age(&self) -> u8 {
self.stage.state.lock().await.node().age
}

/// Returns the `PublicKey` of this node.
pub async fn public_key(&self) -> PublicKey {
self.stage.state.lock().await.node().keypair.public
Expand Down

0 comments on commit 07430a0

Please sign in to comment.