File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ impl RelayerImpl {
425425 validator_packet_batch_size : usize ,
426426 forward_all : bool ,
427427 slot_lookahead : u64 ,
428+ heartbeat_tick_time : u64 ,
428429 ) -> Self {
429430 // receiver tracked as relayer_metrics.subscription_receiver_len
430431 let ( subscription_sender, subscription_receiver) =
@@ -451,6 +452,7 @@ impl RelayerImpl {
451452 address_lookup_table_cache,
452453 validator_packet_batch_size,
453454 forward_all,
455+ heartbeat_tick_time,
454456 ) ;
455457 warn ! ( "RelayerImpl thread exited with result {res:?}" )
456458 } )
@@ -487,10 +489,11 @@ impl RelayerImpl {
487489 address_lookup_table_cache : Arc < DashMap < Pubkey , AddressLookupTableAccount > > ,
488490 validator_packet_batch_size : usize ,
489491 forward_all : bool ,
492+ heartbeat_tick_time : u64 ,
490493 ) -> RelayerResult < ( ) > {
491494 let mut highest_slot = Slot :: default ( ) ;
492495
493- let heartbeat_tick = crossbeam_channel:: tick ( Duration :: from_millis ( 500 ) ) ;
496+ let heartbeat_tick = crossbeam_channel:: tick ( Duration :: from_millis ( heartbeat_tick_time ) ) ;
494497 let metrics_tick = crossbeam_channel:: tick ( Duration :: from_millis ( 1000 ) ) ;
495498
496499 let mut relayer_metrics = RelayerMetrics :: new (
Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ struct Args {
243243 /// The slot lookahead to use when forwarding transactions
244244 #[ arg( long, env, default_value_t = 5 ) ]
245245 slot_lookahead : u64 ,
246+
247+ /// Time in milliseconds between heartbeat ticks
248+ #[ arg( long, env, default_value_t = 100 ) ]
249+ heartbeat_tick_time : u64 ,
246250}
247251
248252#[ derive( Debug ) ]
@@ -543,6 +547,7 @@ fn main() {
543547 args. validator_packet_batch_size ,
544548 args. forward_all ,
545549 args. slot_lookahead ,
550+ args. heartbeat_tick_time ,
546551 ) ;
547552
548553 let priv_key = fs:: read ( & args. signing_key_pem_path ) . unwrap_or_else ( |_| {
You can’t perform that action at this time.
0 commit comments