diff --git a/src/lib.rs b/src/lib.rs index 015eeb1f0..129db97d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,9 +29,9 @@ pub mod tasks; use git_version::git_version; -const GIT_VERSION: &str = git_version!(); +const GIT_VERSION: &str = git_version!(fallback = "unknown"); -pub fn get_git_versin() -> &'static str { +pub fn get_git_version() -> &'static str { GIT_VERSION } diff --git a/src/main.rs b/src/main.rs index d7be66dc1..1a5e49d97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ pub async fn main() -> Result<(), ExitMessage> { .try_init() .map_err(|err| ExitMessage(format!("failed to initialize logger: {}", err)))?; - info!("Starting node with git version {}", fnn::get_git_versin()); + info!("Starting node with git version {}", fnn::get_git_version()); let _span = info_span!("node", node = fnn::get_node_prefix()).entered(); diff --git a/src/rpc/info.rs b/src/rpc/info.rs index ef5648946..9e79533e3 100644 --- a/src/rpc/info.rs +++ b/src/rpc/info.rs @@ -108,7 +108,7 @@ where { async fn node_info(&self) -> Result { let version = env!("CARGO_PKG_VERSION").to_string(); - let commit_hash = crate::get_git_versin().to_string(); + let commit_hash = crate::get_git_version().to_string(); let message = |rpc_reply| NetworkActorMessage::Command(NetworkActorCommand::NodeInfo((), rpc_reply));