File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -666,21 +666,27 @@ impl Provider {
666666 }
667667
668668 /// Subscribe in a loop until successful
669- pub fn subscribe_loop ( & self , sub_id : u64 , filter : Filter ) {
669+ pub fn subscribe_loop (
670+ & self ,
671+ sub_id : u64 ,
672+ filter : Filter ,
673+ print_verbosity_success : u8 ,
674+ print_verbosity_error : u8 ,
675+ ) {
670676 loop {
671677 match self . subscribe ( sub_id, filter. clone ( ) ) {
672678 Ok ( ( ) ) => break ,
673679 Err ( _) => {
674680 crate :: print_to_terminal (
675- 0 ,
681+ print_verbosity_error ,
676682 "failed to subscribe to chain! trying again in 5s..." ,
677683 ) ;
678684 std:: thread:: sleep ( std:: time:: Duration :: from_secs ( 5 ) ) ;
679685 continue ;
680686 }
681687 }
682688 }
683- crate :: print_to_terminal ( 0 , "subscribed to logs successfully" ) ;
689+ crate :: print_to_terminal ( print_verbosity_success , "subscribed to logs successfully" ) ;
684690 }
685691
686692 /// Unsubscribes from a previously created subscription.
You can’t perform that action at this time.
0 commit comments