@@ -468,11 +468,8 @@ async fn test_beacon_api_get_blob_sidecars() {
468
468
let gas_price = provider. get_gas_price ( ) . await . unwrap ( ) ;
469
469
470
470
// Create multiple blob transactions to be included in the same block
471
- let blob_data = vec ! [
472
- b"Hello Beacon API - Blob 1" ,
473
- b"Hello Beacon API - Blob 2" ,
474
- b"Hello Beacon API - Blob 3" ,
475
- ] ;
471
+ let blob_data =
472
+ [ b"Hello Beacon API - Blob 1" , b"Hello Beacon API - Blob 2" , b"Hello Beacon API - Blob 3" ] ;
476
473
477
474
let mut pending_txs = Vec :: new ( ) ;
478
475
@@ -514,9 +511,7 @@ async fn test_beacon_api_get_blob_sidecars() {
514
511
assert_eq ! (
515
512
receipt. block_number. unwrap( ) ,
516
513
block_number,
517
- "Transaction {} was not included in block {}" ,
518
- i,
519
- block_number
514
+ "Transaction {i} was not included in block {block_number}"
520
515
) ;
521
516
}
522
517
@@ -540,10 +535,10 @@ async fn test_beacon_api_get_blob_sidecars() {
540
535
541
536
// Verify blob structure for each blob
542
537
for ( i, blob) in blobs. iter ( ) . enumerate ( ) {
543
- assert ! ( blob[ "index" ] . is_string( ) , "Blob {} missing index" , i ) ;
544
- assert ! ( blob[ "blob" ] . is_string( ) , "Blob {} missing blob data" , i ) ;
545
- assert ! ( blob[ "kzg_commitment" ] . is_string( ) , "Blob {} missing kzg_commitment" , i ) ;
546
- assert ! ( blob[ "kzg_proof" ] . is_string( ) , "Blob {} missing kzg_proof" , i ) ;
538
+ assert ! ( blob[ "index" ] . is_string( ) , "Blob {i } missing index" ) ;
539
+ assert ! ( blob[ "blob" ] . is_string( ) , "Blob {i } missing blob data" ) ;
540
+ assert ! ( blob[ "kzg_commitment" ] . is_string( ) , "Blob {i } missing kzg_commitment" ) ;
541
+ assert ! ( blob[ "kzg_proof" ] . is_string( ) , "Blob {i } missing kzg_proof" ) ;
547
542
}
548
543
549
544
// Test filtering with indices query parameter - single index
@@ -556,7 +551,7 @@ async fn test_beacon_api_get_blob_sidecars() {
556
551
let status = response. status ( ) ;
557
552
if status != reqwest:: StatusCode :: OK {
558
553
let error_body = response. text ( ) . await . unwrap ( ) ;
559
- panic ! ( "Expected OK status, got {}: {}" , status , error_body ) ;
554
+ panic ! ( "Expected OK status, got {status }: {error_body}" ) ;
560
555
}
561
556
let body: serde_json:: Value = response. json ( ) . await . unwrap ( ) ;
562
557
let filtered_blobs = body[ "data" ] . as_array ( ) . unwrap ( ) ;
@@ -601,22 +596,11 @@ async fn test_beacon_api_get_blob_sidecars() {
601
596
let url = format ! ( "{}/eth/v1/beacon/blob_sidecars/{}" , handle. http_endpoint( ) , block_id) ;
602
597
assert_eq ! ( client. get( & url) . send( ) . await . unwrap( ) . status( ) , reqwest:: StatusCode :: OK ) ;
603
598
}
604
- assert_eq ! (
605
- client
606
- . get( & format!( "{}/eth/v1/beacon/blob_sidecars/pending" , handle. http_endpoint( ) ) )
607
- . send( )
608
- . await
609
- . unwrap( )
610
- . status( ) ,
611
- reqwest:: StatusCode :: NOT_FOUND
612
- ) ;
599
+ let url = format ! ( "{}/eth/v1/beacon/blob_sidecars/pending" , handle. http_endpoint( ) ) ;
600
+ assert_eq ! ( client. get( & url) . send( ) . await . unwrap( ) . status( ) , reqwest:: StatusCode :: NOT_FOUND ) ;
613
601
614
602
// Test with hex block number
615
- let url = format ! (
616
- "{}/eth/v1/beacon/blob_sidecars/0x{}" ,
617
- handle. http_endpoint( ) ,
618
- format!( "{:x}" , block_number)
619
- ) ;
603
+ let url = format ! ( "{}/eth/v1/beacon/blob_sidecars/0x{block_number:x}" , handle. http_endpoint( ) ) ;
620
604
let response = client. get ( & url) . send ( ) . await . unwrap ( ) ;
621
605
assert_eq ! ( response. status( ) , reqwest:: StatusCode :: OK ) ;
622
606
0 commit comments