Skip to content

Commit

Permalink
Scope signer store import to the store module
Browse files Browse the repository at this point in the history
  • Loading branch information
Alenar committed Aug 29, 2024
1 parent 8b6511d commit 6fe0220
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mithril-signer/benches/mktree_store_sqlite.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use mithril_common::crypto_helper::{MKTree, MKTreeNode};
use mithril_signer::MKTreeStoreSqlite;
use mithril_signer::store::MKTreeStoreSqlite;

// Shortcuts for magnitudes: K for thousand, M for million
const K: usize = 1_000;
Expand Down
5 changes: 3 additions & 2 deletions mithril-signer/src/dependency_injection/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ use crate::services::{
CardanoTransactionsPreloaderActivationSigner, MithrilSingleSigner, SignerUpkeepService,
TransactionsImporterByChunk, TransactionsImporterWithPruner, TransactionsImporterWithVacuum,
};
use crate::store::{MKTreeStoreSqlite, ProtocolInitializerStore};
use crate::{
Configuration, MKTreeStoreSqlite, MetricsService, ProtocolInitializerStore,
HTTP_REQUEST_TIMEOUT_DURATION, SQLITE_FILE, SQLITE_FILE_CARDANO_TRANSACTION,
Configuration, MetricsService, HTTP_REQUEST_TIMEOUT_DURATION, SQLITE_FILE,
SQLITE_FILE_CARDANO_TRANSACTION,
};

/// The `DependenciesBuilder` is intended to manage Services instance creation.
Expand Down
3 changes: 2 additions & 1 deletion mithril-signer/src/dependency_injection/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use mithril_common::TickerService;
use mithril_persistence::store::StakeStore;

use crate::services::{AggregatorClient, SingleSigner, UpkeepService};
use crate::{MetricsService, ProtocolInitializerStorer};
use crate::store::ProtocolInitializerStorer;
use crate::MetricsService;

type StakeStoreService = Arc<StakeStore>;
type CertificateHandlerService = Arc<dyn AggregatorClient>;
Expand Down
3 changes: 1 addition & 2 deletions mithril-signer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ mod message_adapters;
pub mod metrics;
mod runtime;
pub mod services;
mod store;
pub mod store;

pub use configuration::{Configuration, DefaultConfiguration};
pub use message_adapters::{
FromEpochSettingsAdapter, FromPendingCertificateMessageAdapter, ToRegisterSignerMessageAdapter,
};
pub use metrics::*;
pub use runtime::*;
pub use store::*;

/// HTTP request timeout duration in milliseconds
const HTTP_REQUEST_TIMEOUT_DURATION: u64 = 30000;
Expand Down
3 changes: 2 additions & 1 deletion mithril-signer/src/runtime/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,12 @@ mod tests {
use mockall::mock;
use std::{path::Path, sync::Arc};

use crate::metrics::MetricsService;
use crate::services::{
AggregatorClient, CardanoTransactionsImporter, DumbAggregatorClient, MithrilSingleSigner,
MockAggregatorClient, MockTransactionStore, MockUpkeepService, SingleSigner,
};
use crate::{metrics::MetricsService, ProtocolInitializerStore};
use crate::store::ProtocolInitializerStore;

use super::*;

Expand Down
4 changes: 2 additions & 2 deletions mithril-signer/tests/test_extensions/state_machine_tester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use mithril_signer::{
services::{
AggregatorClient, CardanoTransactionsImporter, MithrilSingleSigner, SignerUpkeepService,
},
Configuration, MKTreeStoreSqlite, MetricsService, ProtocolInitializerStore,
ProtocolInitializerStorer, RuntimeError, SignerRunner, SignerState, StateMachine,
store::{MKTreeStoreSqlite, ProtocolInitializerStore, ProtocolInitializerStorer},
Configuration, MetricsService, RuntimeError, SignerRunner, SignerState, StateMachine,
};

use super::FakeAggregator;
Expand Down

0 comments on commit 6fe0220

Please sign in to comment.