File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ use std::{
2525 atomic:: { AtomicBool , Ordering } ,
2626 Arc ,
2727 } ,
28+ thread:: sleep,
2829 time:: Duration ,
2930} ;
30- use tokio:: time:: sleep;
3131use uuid:: Uuid ;
3232pub mod api;
3333#[ rustfmt:: skip]
@@ -45,7 +45,7 @@ use crate::solana_program::{
4545} ;
4646
4747const MAINNET_GENESIS_HASH : & str = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d" ;
48- const MAX_RETRIES : u32 = 5 ;
48+ const MAX_RETRIES : u32 = 3 ;
4949const INITIAL_RETRY_DELAY_MS : u64 = 500 ;
5050
5151pub fn get_network ( network_str : & str ) -> & str {
@@ -1728,13 +1728,13 @@ where
17281728 Err ( err) if attempts < MAX_RETRIES => {
17291729 attempts += 1 ;
17301730 println ! (
1731- "RPC call failed (attempt {}/{}) - retrying in {} ms... Error: {} " ,
1732- attempts, MAX_RETRIES , delay, err
1731+ "RPC call failed (attempt {}/{}) - retrying in {} ms..." ,
1732+ attempts, MAX_RETRIES , delay
17331733 ) ;
1734- _ = sleep ( Duration :: from_millis ( delay) ) ;
1734+ sleep ( Duration :: from_millis ( delay) ) ;
17351735 delay *= 2 ;
17361736 }
17371737 Err ( err) => return Err ( err) ,
17381738 }
17391739 }
1740- }
1740+ }
You can’t perform that action at this time.
0 commit comments