Skip to content

Commit 085bddd

Browse files
committed
Use shared ctx repository from mithril-persistence
To reduce the duplication between the nodes.
1 parent 8e15481 commit 085bddd

40 files changed

+49
-3044
lines changed

mithril-aggregator/benches/cardano_transactions_get.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ use std::sync::Arc;
33
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
44
use sqlite::ConnectionThreadSafe;
55

6-
use mithril_aggregator::{
7-
database::repository::CardanoTransactionRepository, services::TransactionStore,
8-
};
6+
use mithril_aggregator::services::TransactionStore;
97
use mithril_common::{entities::CardanoTransaction, test_utils::TempDir};
8+
use mithril_persistence::database::repository::CardanoTransactionRepository;
109
use mithril_persistence::sqlite::ConnectionBuilder;
1110

1211
fn cardano_tx_db_connection(db_file_name: &str) -> ConnectionThreadSafe {
@@ -19,7 +18,7 @@ fn cardano_tx_db_connection(db_file_name: &str) -> ConnectionThreadSafe {
1918

2019
ConnectionBuilder::open_file(&db_path)
2120
.with_migrations(
22-
mithril_aggregator::database::cardano_transaction_migration::get_migrations(),
21+
mithril_persistence::database::cardano_transaction_migration::get_migrations(),
2322
)
2423
.build()
2524
.unwrap()

mithril-aggregator/benches/cardano_transactions_import.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ use criterion::{criterion_group, criterion_main, Criterion};
22
use sqlite::ConnectionThreadSafe;
33
use std::sync::Arc;
44

5-
use mithril_aggregator::{
6-
database::repository::CardanoTransactionRepository, services::TransactionStore,
7-
};
85
use mithril_common::{entities::CardanoTransaction, test_utils::TempDir};
6+
use mithril_persistence::database::repository::CardanoTransactionRepository;
97
use mithril_persistence::sqlite::ConnectionBuilder;
108

119
fn cardano_tx_db_connection() -> ConnectionThreadSafe {
@@ -18,7 +16,7 @@ fn cardano_tx_db_connection() -> ConnectionThreadSafe {
1816

1917
ConnectionBuilder::open_file(&db_path)
2018
.with_migrations(
21-
mithril_aggregator::database::cardano_transaction_migration::get_migrations(),
19+
mithril_persistence::database::cardano_transaction_migration::get_migrations(),
2220
)
2321
.build()
2422
.unwrap()

mithril-aggregator/src/database/cardano_transaction_migration.rs

Lines changed: 0 additions & 90 deletions
This file was deleted.

mithril-aggregator/src/database/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! This module contains the entities definition tied with database
33
//! representation with their associated providers.
44
5-
pub mod cardano_transaction_migration;
65
pub mod migration;
76
pub(crate) mod provider;
87
pub mod record;

mithril-aggregator/src/database/provider/block_range_root/get_block_range_root.rs

Lines changed: 0 additions & 41 deletions
This file was deleted.

mithril-aggregator/src/database/provider/block_range_root/get_interval_without_block_range_provider.rs

Lines changed: 0 additions & 43 deletions
This file was deleted.

mithril-aggregator/src/database/provider/block_range_root/insert_block_range.rs

Lines changed: 0 additions & 65 deletions
This file was deleted.

mithril-aggregator/src/database/provider/block_range_root/mod.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

mithril-aggregator/src/database/provider/cardano_transaction/get_cardano_transaction.rs

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)