@@ -44,7 +44,7 @@ impl CardanoTransactionRepository {
4444 }
4545
4646 /// Return all the [CardanoTransactionRecord]s in the database using chronological order.
47- pub async fn get_transactions_between_blocks (
47+ pub async fn get_transactions_in_range_blocks (
4848 & self ,
4949 range : Range < BlockNumber > ,
5050 ) -> StdResult < Vec < CardanoTransactionRecord > > {
@@ -118,7 +118,7 @@ impl CardanoTransactionRepository {
118118 }
119119
120120 /// Create new [BlockRangeRootRecord]s in the database.
121- pub async fn create_block_ranges < T : Into < BlockRangeRootRecord > > (
121+ pub async fn create_block_range_roots < T : Into < BlockRangeRootRecord > > (
122122 & self ,
123123 block_ranges : Vec < T > ,
124124 ) -> StdResult < Vec < BlockRangeRootRecord > > {
@@ -226,23 +226,23 @@ impl TransactionStore for CardanoTransactionRepository {
226226 }
227227 }
228228
229- async fn get_transactions_between (
229+ async fn get_transactions_in_range (
230230 & self ,
231231 range : Range < BlockNumber > ,
232232 ) -> StdResult < Vec < CardanoTransaction > > {
233- self . get_transactions_between_blocks ( range) . await . map ( |v| {
233+ self . get_transactions_in_range_blocks ( range) . await . map ( |v| {
234234 v. into_iter ( )
235235 . map ( |record| record. into ( ) )
236236 . collect :: < Vec < CardanoTransaction > > ( )
237237 } )
238238 }
239239
240- async fn store_block_ranges (
240+ async fn store_block_range_roots (
241241 & self ,
242242 block_ranges : Vec < ( BlockRange , MKTreeNode ) > ,
243243 ) -> StdResult < ( ) > {
244244 if !block_ranges. is_empty ( ) {
245- self . create_block_ranges ( block_ranges) . await ?;
245+ self . create_block_range_roots ( block_ranges) . await ?;
246246 }
247247 Ok ( ( ) )
248248 }
@@ -535,7 +535,7 @@ mod tests {
535535 }
536536
537537 #[ tokio:: test]
538- async fn repository_get_transactions_between_blocks ( ) {
538+ async fn repository_get_transactions_in_range_blocks ( ) {
539539 let connection = Arc :: new ( cardano_tx_db_connection ( ) . unwrap ( ) ) ;
540540 let repository = CardanoTransactionRepository :: new ( connection) ;
541541
@@ -550,23 +550,23 @@ mod tests {
550550 . unwrap ( ) ;
551551
552552 {
553- let transaction_result = repository. get_transactions_between ( 0 ..10 ) . await . unwrap ( ) ;
553+ let transaction_result = repository. get_transactions_in_range ( 0 ..10 ) . await . unwrap ( ) ;
554554 assert_eq ! ( Vec :: <CardanoTransaction >:: new( ) , transaction_result) ;
555555 }
556556 {
557- let transaction_result = repository. get_transactions_between ( 13 ..21 ) . await . unwrap ( ) ;
557+ let transaction_result = repository. get_transactions_in_range ( 13 ..21 ) . await . unwrap ( ) ;
558558 assert_eq ! ( Vec :: <CardanoTransaction >:: new( ) , transaction_result) ;
559559 }
560560 {
561- let transaction_result = repository. get_transactions_between ( 9 ..12 ) . await . unwrap ( ) ;
561+ let transaction_result = repository. get_transactions_in_range ( 9 ..12 ) . await . unwrap ( ) ;
562562 assert_eq ! ( transactions[ 0 ..=1 ] . to_vec( ) , transaction_result) ;
563563 }
564564 {
565- let transaction_result = repository. get_transactions_between ( 10 ..13 ) . await . unwrap ( ) ;
565+ let transaction_result = repository. get_transactions_in_range ( 10 ..13 ) . await . unwrap ( ) ;
566566 assert_eq ! ( transactions. clone( ) , transaction_result) ;
567567 }
568568 {
569- let transaction_result = repository. get_transactions_between ( 11 ..14 ) . await . unwrap ( ) ;
569+ let transaction_result = repository. get_transactions_in_range ( 11 ..14 ) . await . unwrap ( ) ;
570570 assert_eq ! ( transactions[ 1 ..=2 ] . to_vec( ) , transaction_result) ;
571571 }
572572 }
@@ -604,7 +604,7 @@ mod tests {
604604 // The last block range give the lower bound
605605 let last_block_range = BlockRange :: from_block_number ( 0 ) ;
606606 repository
607- . store_block_ranges ( vec ! [ (
607+ . store_block_range_roots ( vec ! [ (
608608 last_block_range. clone( ) ,
609609 MKTreeNode :: from_hex( "AAAA" ) . unwrap( ) ,
610610 ) ] )
@@ -631,7 +631,7 @@ mod tests {
631631
632632 let last_block_range = BlockRange :: from_block_number ( BlockRange :: LENGTH * 10 ) ;
633633 repository
634- . store_block_ranges ( vec ! [ (
634+ . store_block_range_roots ( vec ! [ (
635635 last_block_range. clone( ) ,
636636 MKTreeNode :: from_hex( "AAAA" ) . unwrap( ) ,
637637 ) ] )
@@ -672,7 +672,7 @@ mod tests {
672672 let repository = CardanoTransactionRepository :: new ( connection. clone ( ) ) ;
673673
674674 repository
675- . store_block_ranges ( vec ! [
675+ . store_block_range_roots ( vec ! [
676676 (
677677 BlockRange :: from_block_number( 0 ) ,
678678 MKTreeNode :: from_hex( "AAAA" ) . unwrap( ) ,
@@ -709,11 +709,11 @@ mod tests {
709709 let range = BlockRange :: from_block_number ( 0 ) ;
710710
711711 repository
712- . store_block_ranges ( vec ! [ ( range. clone( ) , MKTreeNode :: from_hex( "AAAA" ) . unwrap( ) ) ] )
712+ . store_block_range_roots ( vec ! [ ( range. clone( ) , MKTreeNode :: from_hex( "AAAA" ) . unwrap( ) ) ] )
713713 . await
714714 . unwrap ( ) ;
715715 repository
716- . store_block_ranges ( vec ! [ ( range. clone( ) , MKTreeNode :: from_hex( "BBBB" ) . unwrap( ) ) ] )
716+ . store_block_range_roots ( vec ! [ ( range. clone( ) , MKTreeNode :: from_hex( "BBBB" ) . unwrap( ) ) ] )
717717 . await
718718 . unwrap ( ) ;
719719
0 commit comments