diff --git a/relayer/src/relayer.rs b/relayer/src/relayer.rs index bd7ce5d..a5f7b9d 100644 --- a/relayer/src/relayer.rs +++ b/relayer/src/relayer.rs @@ -425,6 +425,7 @@ impl RelayerImpl { validator_packet_batch_size: usize, forward_all: bool, slot_lookahead: u64, + heartbeat_tick_time: u64, ) -> Self { // receiver tracked as relayer_metrics.subscription_receiver_len let (subscription_sender, subscription_receiver) = @@ -451,6 +452,7 @@ impl RelayerImpl { address_lookup_table_cache, validator_packet_batch_size, forward_all, + heartbeat_tick_time, ); warn!("RelayerImpl thread exited with result {res:?}") }) @@ -487,10 +489,11 @@ impl RelayerImpl { address_lookup_table_cache: Arc>, validator_packet_batch_size: usize, forward_all: bool, + heartbeat_tick_time: u64, ) -> RelayerResult<()> { let mut highest_slot = Slot::default(); - let heartbeat_tick = crossbeam_channel::tick(Duration::from_millis(500)); + let heartbeat_tick = crossbeam_channel::tick(Duration::from_millis(heartbeat_tick_time)); let metrics_tick = crossbeam_channel::tick(Duration::from_millis(1000)); let mut relayer_metrics = RelayerMetrics::new( diff --git a/transaction-relayer/src/main.rs b/transaction-relayer/src/main.rs index 33412e5..21b2377 100644 --- a/transaction-relayer/src/main.rs +++ b/transaction-relayer/src/main.rs @@ -240,6 +240,10 @@ struct Args { /// The slot lookahead to use when forwarding transactions #[arg(long, env, default_value_t = 5)] slot_lookahead: u64, + + /// Time in milliseconds between heartbeat ticks + #[arg(long, env, default_value_t = 100)] + heartbeat_tick_time: u64, } #[derive(Debug)] @@ -536,6 +540,7 @@ fn main() { args.validator_packet_batch_size, args.forward_all, args.slot_lookahead, + args.heartbeat_tick_time, ); let priv_key = fs::read(&args.signing_key_pem_path).unwrap_or_else(|_| {