Advertise node software version in gossip (#9981)

* Advertise node version in gossip

* Remove solana_clap_utils::version! macro
This commit is contained in:
Michael Vines
2020-05-11 15:02:01 -07:00
committed by GitHub
parent 965204b8e0
commit 2521f75c18
50 changed files with 223 additions and 66 deletions

View File

@ -1,24 +1,5 @@
use thiserror::Error;
#[macro_export]
macro_rules! version {
() => {
&*format!(
"{}{}",
env!("CARGO_PKG_VERSION"),
if option_env!("CI_TAG").unwrap_or("").is_empty() {
format!(
" [channel={} commit={}]",
option_env!("CHANNEL").unwrap_or("unknown"),
option_env!("CI_COMMIT").unwrap_or("unknown"),
)
} else {
"".to_string()
},
)
};
}
pub struct ArgConstant<'a> {
pub long: &'a str,
pub name: &'a str,