Skip to content

Commit 327a023

Browse files
committed
feat(client-cli): stable 'tools utxo-hd' command
1 parent d1a7dd2 commit 327a023

File tree

3 files changed

+3
-36
lines changed

3 files changed

+3
-36
lines changed

mithril-client-cli/src/commands/cardano_db/shared_steps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub fn log_download_information(
172172

173173
let snapshot_converter_cmd = |flavor| {
174174
format!(
175-
"mithril-client --unstable tools utxo-hd snapshot-converter --db-directory {} --cardano-node-version {} --utxo-hd-flavor {} --commit",
175+
"mithril-client tools utxo-hd snapshot-converter --db-directory {} --cardano-node-version {} --utxo-hd-flavor {} --commit",
176176
db_dir.display(),
177177
cardano_node_version,
178178
flavor,

mithril-client-cli/src/commands/tools/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use mithril_client::MithrilResult;
1313

1414
/// Tools commands
1515
#[derive(Subcommand, Debug, Clone)]
16-
#[command(about = "[unstable] Tools commands")]
16+
#[command(about = "Tools commands")]
1717
pub enum ToolsCommands {
1818
/// UTxO-HD related commands
1919
#[clap(subcommand, name = "utxo-hd")]

mithril-client-cli/src/main.rs

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,7 @@ impl ArtifactCommands {
250250
Self::GenerateDoc(cmd) => {
251251
cmd.execute(&mut Args::command()).map_err(|message| anyhow!(message))
252252
}
253-
Self::Tools(cmd) => {
254-
context.require_unstable("tools", Some("utxo-hd snapshot-converter"))?;
255-
cmd.execute().await
256-
}
253+
Self::Tools(cmd) => cmd.execute().await,
257254
}
258255
}
259256
}
@@ -281,36 +278,6 @@ async fn main() -> MithrilResult<()> {
281278
mod tests {
282279
use super::*;
283280

284-
#[tokio::test]
285-
async fn fail_if_tools_command_is_used_without_unstable_flag() {
286-
let args = Args::try_parse_from([
287-
"mithril-client",
288-
"tools",
289-
"utxo-hd",
290-
"snapshot-converter",
291-
"--db-directory",
292-
"whatever",
293-
"--cardano-network",
294-
"preview",
295-
"--cardano-node-version",
296-
"1.2.3",
297-
"--utxo-hd-flavor",
298-
"Legacy",
299-
])
300-
.unwrap();
301-
302-
let error = args
303-
.execute(Logger::root(slog::Discard, slog::o!()))
304-
.await
305-
.expect_err("Should fail if unstable flag missing");
306-
307-
assert!(
308-
error
309-
.to_string()
310-
.contains("subcommand is only accepted using the --unstable flag.")
311-
);
312-
}
313-
314281
#[tokio::test]
315282
async fn verify_subcommand_should_fail_with_cardano_db_v1() {
316283
let args = Args::try_parse_from([

0 commit comments

Comments
 (0)