From d713525bb998e18bf0eccfb1023a1f537dbb6b35 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Thu, 12 Sep 2024 15:34:23 +0200 Subject: [PATCH] try to strip namada version from moniker --- crates/node/src/tendermint_node.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/node/src/tendermint_node.rs b/crates/node/src/tendermint_node.rs index 67336c0ad3..68698590be 100644 --- a/crates/node/src/tendermint_node.rs +++ b/crates/node/src/tendermint_node.rs @@ -275,10 +275,13 @@ async fn update_tendermint_config( home_dir: impl AsRef, mut config: TendermintConfig, ) -> Result<()> { - let path = configuration(home_dir); - + let path: PathBuf = configuration(home_dir); + let actual_moniker = config.moniker.to_string(); + let actual_moniker = actual_moniker + .strip_suffix(namada_version()) + .unwrap_or(&actual_moniker); config.moniker = - Moniker::from_str(&format!("{}-{}", config.moniker, namada_version())) + Moniker::from_str(&format!("{}-{}", actual_moniker, namada_version())) .expect("Invalid moniker"); config.consensus.create_empty_blocks = true;