1+ use std:: time:: Duration ;
2+
13use alloy:: {
24 contract:: Error ,
35 primitives:: Address ,
@@ -9,15 +11,14 @@ use ethereum_consensus::primitives::BlsPublicKey;
911use eyre:: { bail, Context } ;
1012use reqwest:: { Client , Url } ;
1113use serde:: Serialize ;
12-
1314use tracing:: { debug, warn} ;
15+
1416use BoltManagerContract :: {
1517 BoltManagerContractErrors , BoltManagerContractInstance , ProposerStatus , ValidatorDoesNotExist ,
1618} ;
1719
18- use crate :: config:: chain:: Chain ;
19-
2020use super :: utils:: { self , CompressedHash } ;
21+ use crate :: config:: chain:: Chain ;
2122
2223/// Maximum number of keys to fetch from the EL node in a single query.
2324const MAX_CHUNK_SIZE : usize = 100 ;
@@ -86,15 +87,8 @@ impl BoltManager {
8687 // `retry_with_backoff_if` is not used here because we need to check
8788 // that the error is retryable.
8889 if transport_err. to_string ( ) . contains ( "error sending request for url" ) {
89- warn ! (
90- "Retryable transport error when connecting to EL node: {}" ,
91- transport_err
92- ) ;
93- // Crude increasing backoff
94- tokio:: time:: sleep ( std:: time:: Duration :: from_millis (
95- 100 * retries as u64 ,
96- ) )
97- . await ;
90+ warn ! ( "Transport error when connecting to EL node: {}" , transport_err) ;
91+ tokio:: time:: sleep ( Duration :: from_millis ( 100 * retries as u64 ) ) . await ;
9892 continue ;
9993 }
10094 warn ! (
@@ -108,9 +102,7 @@ impl BoltManager {
108102 let decoded_error = utils:: try_parse_contract_error ( err)
109103 . wrap_err ( "Failed to fetch proposer statuses from EL client" ) ?;
110104
111- bail ! (
112- generate_bolt_manager_error( decoded_error, commitment_signer_pubkey, )
113- ) ;
105+ bail ! ( generate_bolt_manager_error( decoded_error, commitment_signer_pubkey) ) ;
114106 }
115107 }
116108 } ;
@@ -226,8 +218,7 @@ sol! {
226218#[ cfg( test) ]
227219mod tests {
228220 use :: hex:: FromHex ;
229- use alloy:: hex;
230- use alloy:: primitives:: Address ;
221+ use alloy:: { hex, primitives:: Address } ;
231222 use alloy_node_bindings:: Anvil ;
232223 use ethereum_consensus:: primitives:: BlsPublicKey ;
233224 use reqwest:: Url ;
@@ -268,8 +259,8 @@ mod tests {
268259 . as_ref( ) ) . expect( "valid bls public key" ) ] ;
269260 let res = manager. verify_validator_pubkeys ( keys. clone ( ) , commitment_signer_pubkey) . await ;
270261 assert ! (
271- res. unwrap_err( ) . to_string( )
272- == generate_operator_keys_mismatch_error(
262+ res. unwrap_err( ) . to_string( ) ==
263+ generate_operator_keys_mismatch_error(
273264 pubkey_hash( & keys[ 0 ] ) ,
274265 commitment_signer_pubkey,
275266 operator
@@ -317,8 +308,8 @@ mod tests {
317308 let result = manager. verify_validator_pubkeys ( keys. clone ( ) , commitment_signer_pubkey) . await ;
318309
319310 assert ! (
320- result. unwrap_err( ) . to_string( )
321- == generate_operator_keys_mismatch_error(
311+ result. unwrap_err( ) . to_string( ) ==
312+ generate_operator_keys_mismatch_error(
322313 pubkey_hash( & keys[ 0 ] ) ,
323314 commitment_signer_pubkey,
324315 operator
0 commit comments