@@ -205,48 +205,51 @@ where
205
205
}
206
206
207
207
/// Returns the blob from the pylon blob indexer.
208
- #[ instrument( skip_all, err ) ]
208
+ #[ instrument( skip_all) ]
209
209
async fn get_blobs_from_pylon ( & self , tx : TxHash ) -> FetchResult < Blobs > {
210
- if let Some ( url) = & self . pylon_url {
211
- let url = url. join ( & format ! ( "sidecar/{tx}" ) ) ?;
212
-
213
- let response = self . client . get ( url) . header ( "accept" , "application/json" ) . send ( ) . await ?;
214
- response
215
- . json :: < Arc < BlobTransactionSidecarVariant > > ( )
216
- . await
217
- . map ( Into :: into)
218
- . map_err ( Into :: into)
219
- } else {
220
- Err ( BlobFetcherError :: Unrecoverable ( UnrecoverableBlobError :: ConsensusClientUrlNotSet ) )
221
- }
210
+ let Some ( url) = & self . pylon_url else {
211
+ return Err ( BlobFetcherError :: Unrecoverable (
212
+ UnrecoverableBlobError :: ConsensusClientUrlNotSet ,
213
+ ) ) ;
214
+ } ;
215
+ let url = url. join ( & format ! ( "sidecar/{tx}" ) ) ?;
216
+
217
+ let response = self . client . get ( url) . header ( "accept" , "application/json" ) . send ( ) . await ?;
218
+ response
219
+ . json :: < Arc < BlobTransactionSidecarVariant > > ( )
220
+ . await
221
+ . map ( Into :: into)
222
+ . map_err ( Into :: into)
222
223
}
223
224
224
225
/// Queries the connected consensus client for the blob transaction
225
- #[ instrument( skip_all, err ) ]
226
+ #[ instrument( skip_all) ]
226
227
async fn get_blobs_from_cl (
227
228
& self ,
228
229
slot : usize ,
229
230
versioned_hashes : & [ B256 ] ,
230
231
) -> FetchResult < Blobs > {
231
- if let Some ( url) = & self . cl_url {
232
- let url = url. join ( & format ! ( "/eth/v1/beacon/blob_sidecars/{slot}" ) ) . map_err ( |err| {
233
- BlobFetcherError :: Unrecoverable ( UnrecoverableBlobError :: UrlParse ( err) )
234
- } ) ?;
232
+ let Some ( url) = & self . cl_url else {
233
+ return Err ( BlobFetcherError :: Unrecoverable (
234
+ UnrecoverableBlobError :: ConsensusClientUrlNotSet ,
235
+ ) ) ;
236
+ } ;
235
237
236
- let response = self . client . get ( url) . header ( "accept" , "application/json" ) . send ( ) . await ?;
238
+ let url = url. join ( & format ! ( "/eth/v1/beacon/blob_sidecars/{slot}" ) ) . map_err ( |err| {
239
+ BlobFetcherError :: Unrecoverable ( UnrecoverableBlobError :: UrlParse ( err) )
240
+ } ) ?;
237
241
238
- let response: BeaconBlobBundle = response . json ( ) . await ?;
242
+ let response = self . client . get ( url ) . header ( "accept" , "application/ json" ) . send ( ) . await ?;
239
243
240
- extract_blobs_from_bundle ( response, versioned_hashes)
241
- } else {
242
- Err ( BlobFetcherError :: Unrecoverable ( UnrecoverableBlobError :: ConsensusClientUrlNotSet ) )
243
- }
244
+ let response: BeaconBlobBundle = response. json ( ) . await ?;
245
+
246
+ extract_blobs_from_bundle ( response, versioned_hashes)
244
247
}
245
248
246
249
/// Get the Zenith block from the extracted event.
247
250
/// For 4844 transactions, this fetches the transaction's blobs and decodes them.
248
251
/// For any other type of transactions, it returns a Non4844Transaction error.
249
- #[ tracing:: instrument( skip( self , extract) , fields( eip4844 = extract . is_eip4844 ( ) , tx = %extract. tx_hash( ) , url = self . explorer. baseurl( ) ) ) ]
252
+ #[ tracing:: instrument( skip( self , extract) , fields( tx = %extract. tx_hash( ) , url = self . explorer. baseurl( ) ) ) ]
250
253
async fn get_signet_block (
251
254
& self ,
252
255
extract : & ExtractedEvent < ' _ , Receipt , BlockSubmitted > ,
0 commit comments