From 12ea38d5efca7b4239c7b68df673def61045a861 Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 13 Oct 2025 12:45:46 +0200 Subject: [PATCH 1/2] feat(client): add re-export of `mithril-common` `Dummy` trait To allow usage without needing an import of common. Note: reexport of `fake_data` and `fake_keys` were considered as well but were discarded in order to maintain ability to changes them easily without having to worry about breaking `mithril-client` library. This problem is less relevant for the `Dummy` trait as it's really simple and don't risk to change anytime soon. --- mithril-client-cli/src/commands/cardano_db/download/v1.rs | 4 ++-- mithril-client-cli/src/commands/cardano_db/download/v2.rs | 2 +- mithril-client-cli/src/commands/cardano_db/shared_steps.rs | 4 ++-- mithril-client/src/type_alias.rs | 7 +++++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mithril-client-cli/src/commands/cardano_db/download/v1.rs b/mithril-client-cli/src/commands/cardano_db/download/v1.rs index dc6197d14b9..f4fc7a0ad7b 100644 --- a/mithril-client-cli/src/commands/cardano_db/download/v1.rs +++ b/mithril-client-cli/src/commands/cardano_db/download/v1.rs @@ -234,9 +234,9 @@ impl PreparedCardanoDbV1Download { mod tests { use mithril_client::{ MithrilCertificateMetadata, - common::{CardanoDbBeacon, ProtocolMessagePartKey, SignedEntityType}, + common::{CardanoDbBeacon, ProtocolMessagePartKey, SignedEntityType, test::Dummy}, }; - use mithril_common::test::{TempDir, double::Dummy}; + use mithril_common::test::TempDir; use super::*; diff --git a/mithril-client-cli/src/commands/cardano_db/download/v2.rs b/mithril-client-cli/src/commands/cardano_db/download/v2.rs index b68d1d42436..7634cddd584 100644 --- a/mithril-client-cli/src/commands/cardano_db/download/v2.rs +++ b/mithril-client-cli/src/commands/cardano_db/download/v2.rs @@ -307,8 +307,8 @@ impl PreparedCardanoDbV2Download { #[cfg(test)] mod tests { + use mithril_client::common::test::Dummy; use mithril_client::common::{AncillaryMessagePart, DigestsMessagePart, ImmutablesMessagePart}; - use mithril_common::test::double::Dummy; use super::*; diff --git a/mithril-client-cli/src/commands/cardano_db/shared_steps.rs b/mithril-client-cli/src/commands/cardano_db/shared_steps.rs index f80b3fbfa2f..0f33645c96f 100644 --- a/mithril-client-cli/src/commands/cardano_db/shared_steps.rs +++ b/mithril-client-cli/src/commands/cardano_db/shared_steps.rs @@ -240,9 +240,9 @@ pub fn log_download_information( mod tests { use mithril_client::{ MithrilCertificateMetadata, - common::{CardanoDbBeacon, ProtocolMessagePartKey, SignedEntityType}, + common::{CardanoDbBeacon, ProtocolMessagePartKey, SignedEntityType, test::Dummy}, }; - use mithril_common::test::{TempDir, double::Dummy}; + use mithril_common::test::TempDir; use crate::utils::ProgressOutputType; diff --git a/mithril-client/src/type_alias.rs b/mithril-client/src/type_alias.rs index aa616139b48..1f0d8162029 100644 --- a/mithril-client/src/type_alias.rs +++ b/mithril-client/src/type_alias.rs @@ -77,4 +77,11 @@ pub mod common { pub use mithril_common::messages::{ AncillaryMessagePart, DigestsMessagePart, ImmutablesMessagePart, }; + + /// Test utilities. + /// + /// ⚠ Do not use in production code ⚠ + pub mod test { + pub use mithril_common::test::double::Dummy; + } } From 7ca4c897c0131b6ce4aa7f7ab9c1c5afc9f9d667 Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 13 Oct 2025 12:49:55 +0200 Subject: [PATCH 2/2] chore: upgrade crate versions * mithril-client-cli from `0.12.31` to `0.12.32` * mithril-client from `0.12.31` to `0.12.32` --- Cargo.lock | 4 ++-- mithril-client-cli/Cargo.toml | 2 +- mithril-client/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90594e30ae8..94976a2ec56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4162,7 +4162,7 @@ dependencies = [ [[package]] name = "mithril-client" -version = "0.12.31" +version = "0.12.32" dependencies = [ "anyhow", "async-recursion", @@ -4200,7 +4200,7 @@ dependencies = [ [[package]] name = "mithril-client-cli" -version = "0.12.31" +version = "0.12.32" dependencies = [ "anyhow", "async-trait", diff --git a/mithril-client-cli/Cargo.toml b/mithril-client-cli/Cargo.toml index 2ff00f285fc..5ce4e17d65d 100644 --- a/mithril-client-cli/Cargo.toml +++ b/mithril-client-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-client-cli" -version = "0.12.31" +version = "0.12.32" description = "A Mithril Client" authors = { workspace = true } edition = { workspace = true } diff --git a/mithril-client/Cargo.toml b/mithril-client/Cargo.toml index 6b6a68dd30d..82cb76c7f2d 100644 --- a/mithril-client/Cargo.toml +++ b/mithril-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-client" -version = "0.12.31" +version = "0.12.32" description = "Mithril client library" authors = { workspace = true } edition = { workspace = true }