Skip to content

Commit

Permalink
Simplify 'api_version' module
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Mar 17, 2023
1 parent ac58d5d commit ec49f73
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mithril-aggregator/src/command_args.rs
Expand Up @@ -18,7 +18,7 @@ use tokio::{
};

use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
certificate_chain::MithrilCertificateVerifier,
chain_observer::{CardanoCliRunner, ChainObserver},
crypto_helper::{
Expand Down
4 changes: 2 additions & 2 deletions mithril-aggregator/src/dependency.rs
@@ -1,5 +1,5 @@
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
certificate_chain::CertificateVerifier,
chain_observer::ChainObserver,
crypto_helper::ProtocolGenesisVerifier,
Expand Down Expand Up @@ -275,7 +275,7 @@ pub mod tests {
SingleSignatureStore, SnapshotUploaderType, VerificationKeyStore,
};
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
certificate_chain::MithrilCertificateVerifier,
chain_observer::FakeObserver,
crypto_helper::{key_encode_hex, ProtocolGenesisSigner},
Expand Down
2 changes: 1 addition & 1 deletion mithril-aggregator/src/http_server/routes/router.rs
Expand Up @@ -4,7 +4,7 @@ use crate::http_server::routes::{
use crate::http_server::SERVER_BASE_PATH;
use crate::DependencyManager;

use mithril_common::api::APIVersionProvider;
use mithril_common::api_version::APIVersionProvider;
use mithril_common::MITHRIL_API_VERSION_HEADER;

use reqwest::StatusCode;
Expand Down
2 changes: 1 addition & 1 deletion mithril-aggregator/tests/test_extensions/dependency.rs
Expand Up @@ -5,7 +5,7 @@ use mithril_aggregator::{
MultiSignerImpl, ProtocolParametersStore, SingleSignatureStore, SnapshotUploaderType,
VerificationKeyStore,
};
use mithril_common::api::APIVersionProvider;
use mithril_common::api_version::APIVersionProvider;
use mithril_common::certificate_chain::MithrilCertificateVerifier;
use mithril_common::chain_observer::FakeObserver;
use mithril_common::crypto_helper::{key_encode_hex, ProtocolGenesisSigner};
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/aggregator.rs
@@ -1,7 +1,7 @@
use async_trait::async_trait;
use flate2::read::GzDecoder;
use futures::StreamExt;
use mithril_common::api::APIVersionProvider;
use mithril_common::api_version::APIVersionProvider;
use mithril_common::MITHRIL_API_VERSION_HEADER;
use reqwest::{self, Response, StatusCode};
use reqwest::{Client, RequestBuilder};
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/commands/download.rs
Expand Up @@ -3,7 +3,7 @@ use std::{error::Error, fmt::Display, sync::Arc};
use clap::Parser;
use config::{builder::DefaultState, ConfigBuilder};
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
entities::Epoch,
era::{EraChecker, SupportedEra},
};
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/commands/list.rs
Expand Up @@ -4,7 +4,7 @@ use clap::Parser;
use cli_table::{print_stdout, WithTitle};
use config::{builder::DefaultState, ConfigBuilder};
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
entities::Epoch,
era::{EraChecker, SupportedEra},
};
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/commands/restore.rs
Expand Up @@ -2,7 +2,7 @@ use clap::Parser;
use config::{builder::DefaultState, ConfigBuilder};
use directories::ProjectDirs;
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
certificate_chain::MithrilCertificateVerifier,
crypto_helper::{key_decode_hex, ProtocolGenesisVerifier},
digesters::{
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/commands/show.rs
Expand Up @@ -4,7 +4,7 @@ use clap::Parser;
use cli_table::{print_stdout, WithTitle};
use config::{builder::DefaultState, ConfigBuilder};
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
entities::Epoch,
era::{EraChecker, SupportedEra},
};
Expand Down
5 changes: 0 additions & 5 deletions mithril-common/src/api/mod.rs

This file was deleted.

Expand Up @@ -90,7 +90,7 @@ mod test {
use std::{collections::HashMap, sync::Arc};

use crate::{
api::version::APIVersionProvider,
api_version::APIVersionProvider,
entities::Epoch,
era::{EraChecker, SupportedEra},
};
Expand Down
2 changes: 1 addition & 1 deletion mithril-common/src/lib.rs
Expand Up @@ -10,7 +10,7 @@
//! - A [certificate chain] used to validate the Certificate Chain created by an aggregator
//! - The [entities] used by, and exchanged between, the aggregator, signers and client.

pub mod api;
pub mod api_version;
mod beacon_provider;
pub mod certificate_chain;
pub mod chain_observer;
Expand Down
2 changes: 1 addition & 1 deletion mithril-signer/src/certificate_handler.rs
Expand Up @@ -5,7 +5,7 @@ use std::{io, sync::Arc};
use thiserror::Error;

use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
entities::{CertificatePending, EpochSettings, Signer, SingleSignatures},
messages::{CertificatePendingMessage, EpochSettingsMessage},
MITHRIL_API_VERSION_HEADER, MITHRIL_SIGNER_VERSION_HEADER,
Expand Down
2 changes: 1 addition & 1 deletion mithril-signer/src/runtime/runner.rs
Expand Up @@ -476,7 +476,7 @@ impl Runner for SignerRunner {
#[cfg(test)]
mod tests {
use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
chain_observer::{ChainObserver, FakeObserver},
crypto_helper::ProtocolInitializer,
digesters::{DumbImmutableDigester, DumbImmutableFileObserver},
Expand Down
2 changes: 1 addition & 1 deletion mithril-signer/src/runtime/signer_services.rs
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use mithril_common::{
api::APIVersionProvider,
api_version::APIVersionProvider,
chain_observer::{CardanoCliChainObserver, CardanoCliRunner, ChainObserver},
crypto_helper::{OpCert, ProtocolPartyId, SerDeShelleyFileFormat},
digesters::{
Expand Down
@@ -1,5 +1,5 @@
#![allow(dead_code)]
use mithril_common::api::APIVersionProvider;
use mithril_common::api_version::APIVersionProvider;
use mithril_common::digesters::ImmutableFileObserver;
use mithril_common::entities::SignerWithStake;
use mithril_common::era::{
Expand Down

0 comments on commit ec49f73

Please sign in to comment.