@@ -118,6 +118,7 @@ fn wait_for_restart_window(
118118 min_idle_time_in_minutes : usize ,
119119 max_delinquency_percentage : u8 ,
120120 skip_new_snapshot_check : bool ,
121+ skip_health_check : bool ,
121122) -> Result < ( ) , Box < dyn std:: error:: Error > > {
122123 let sleep_interval = Duration :: from_secs ( 5 ) ;
123124
@@ -161,7 +162,7 @@ fn wait_for_restart_window(
161162 seen_incremential_snapshot |= snapshot_slot_info_has_incremential;
162163
163164 let epoch_info = rpc_client. get_epoch_info_with_commitment ( CommitmentConfig :: processed ( ) ) ?;
164- let healthy = rpc_client. get_health ( ) . ok ( ) . is_some ( ) ;
165+ let healthy = skip_health_check || rpc_client. get_health ( ) . ok ( ) . is_some ( ) ;
165166 let delinquent_stake_percentage = {
166167 let vote_accounts = rpc_client. get_vote_accounts ( ) ?;
167168 let current_stake: u64 = vote_accounts
@@ -649,6 +650,7 @@ pub fn main() {
649650 let force = subcommand_matches. is_present ( "force" ) ;
650651 let monitor = subcommand_matches. is_present ( "monitor" ) ;
651652 let skip_new_snapshot_check = subcommand_matches. is_present ( "skip_new_snapshot_check" ) ;
653+ let skip_health_check = subcommand_matches. is_present ( "skip_health_check" ) ;
652654 let max_delinquent_stake =
653655 value_t_or_exit ! ( subcommand_matches, "max_delinquent_stake" , u8 ) ;
654656
@@ -659,6 +661,7 @@ pub fn main() {
659661 min_idle_time,
660662 max_delinquent_stake,
661663 skip_new_snapshot_check,
664+ skip_health_check,
662665 )
663666 . unwrap_or_else ( |err| {
664667 println ! ( "{err}" ) ;
@@ -777,13 +780,15 @@ pub fn main() {
777780 let max_delinquent_stake =
778781 value_t_or_exit ! ( subcommand_matches, "max_delinquent_stake" , u8 ) ;
779782 let skip_new_snapshot_check = subcommand_matches. is_present ( "skip_new_snapshot_check" ) ;
783+ let skip_health_check = subcommand_matches. is_present ( "skip_health_check" ) ;
780784
781785 wait_for_restart_window (
782786 & ledger_path,
783787 identity,
784788 min_idle_time,
785789 max_delinquent_stake,
786790 skip_new_snapshot_check,
791+ skip_health_check,
787792 )
788793 . unwrap_or_else ( |err| {
789794 println ! ( "{err}" ) ;
0 commit comments