File tree Expand file tree Collapse file tree 2 files changed +14
-22
lines changed
mithril-aggregator/src/database/repository
mithril-signer/src/database/repository Expand file tree Collapse file tree 2 files changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ use crate::database::provider::{
22
22
use crate :: database:: record:: { BlockRangeRootRecord , CardanoTransactionRecord } ;
23
23
use crate :: services:: { TransactionStore , TransactionsRetriever } ;
24
24
25
- #[ cfg( test) ]
26
- use mithril_persistence:: sqlite:: GetAllProvider ;
27
-
28
25
/// ## Cardano transaction repository
29
26
///
30
27
/// This is a business oriented layer to perform actions on the database through
@@ -193,14 +190,6 @@ impl CardanoTransactionRepository {
193
190
194
191
Ok ( Box :: new ( iterator) )
195
192
}
196
-
197
- #[ cfg( test) ]
198
- pub ( crate ) async fn get_all ( & self ) -> StdResult < Vec < CardanoTransaction > > {
199
- let provider = GetCardanoTransactionProvider :: new ( & self . connection ) ;
200
- let records = provider. get_all ( ) ?;
201
-
202
- Ok ( records. map ( |record| record. into ( ) ) . collect ( ) )
203
- }
204
193
}
205
194
206
195
#[ cfg( test) ]
@@ -212,6 +201,13 @@ pub mod test_extensions {
212
201
use super :: * ;
213
202
214
203
impl CardanoTransactionRepository {
204
+ pub async fn get_all ( & self ) -> StdResult < Vec < CardanoTransaction > > {
205
+ let provider = GetCardanoTransactionProvider :: new ( & self . connection ) ;
206
+ let records = provider. get_all ( ) ?;
207
+
208
+ Ok ( records. map ( |record| record. into ( ) ) . collect ( ) )
209
+ }
210
+
215
211
pub fn get_all_block_range_root ( & self ) -> StdResult < Vec < BlockRangeRootRecord > > {
216
212
let provider = GetBlockRangeRootProvider :: new ( & self . connection ) ;
217
213
let records = provider. get_all ( ) ?;
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ use crate::database::provider::{
22
22
use crate :: database:: record:: { BlockRangeRootRecord , CardanoTransactionRecord } ;
23
23
use crate :: TransactionStore ;
24
24
25
- #[ cfg( test) ]
26
- use mithril_persistence:: sqlite:: GetAllProvider ;
27
-
28
25
/// ## Cardano transaction repository
29
26
///
30
27
/// This is a business oriented layer to perform actions on the database through
@@ -173,14 +170,6 @@ impl CardanoTransactionRepository {
173
170
174
171
Ok ( Box :: new ( iterator) )
175
172
}
176
-
177
- #[ cfg( test) ]
178
- pub ( crate ) async fn get_all ( & self ) -> StdResult < Vec < CardanoTransaction > > {
179
- let provider = GetCardanoTransactionProvider :: new ( & self . connection ) ;
180
- let records = provider. get_all ( ) ?;
181
-
182
- Ok ( records. map ( |record| record. into ( ) ) . collect ( ) )
183
- }
184
173
}
185
174
186
175
#[ cfg( test) ]
@@ -192,6 +181,13 @@ pub mod test_extensions {
192
181
use super :: * ;
193
182
194
183
impl CardanoTransactionRepository {
184
+ pub async fn get_all ( & self ) -> StdResult < Vec < CardanoTransaction > > {
185
+ let provider = GetCardanoTransactionProvider :: new ( & self . connection ) ;
186
+ let records = provider. get_all ( ) ?;
187
+
188
+ Ok ( records. map ( |record| record. into ( ) ) . collect ( ) )
189
+ }
190
+
195
191
pub fn get_all_block_range_root ( & self ) -> StdResult < Vec < BlockRangeRootRecord > > {
196
192
let provider = GetBlockRangeRootProvider :: new ( & self . connection ) ;
197
193
let records = provider. get_all ( ) ?;
You can’t perform that action at this time.
0 commit comments