From 5096e01a60a90dce7088a93ee3bc874877589d81 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sat, 28 Feb 2026 16:04:15 +0100 Subject: [PATCH] [feat](trx-client,trx-frontend-http): raise spectrum update rate Co-authored-by: Codex Signed-off-by: Stan Grams --- src/trx-client/src/remote_client.rs | 2 +- src/trx-client/trx-frontend/trx-frontend-http/src/api.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trx-client/src/remote_client.rs b/src/trx-client/src/remote_client.rs index 2c2258d..69f7e3b 100644 --- a/src/trx-client/src/remote_client.rs +++ b/src/trx-client/src/remote_client.rs @@ -40,7 +40,7 @@ impl RemoteEndpoint { } } -const SPECTRUM_POLL_INTERVAL: Duration = Duration::from_millis(200); +const SPECTRUM_POLL_INTERVAL: Duration = Duration::from_millis(40); pub struct RemoteClientConfig { pub addr: String, diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs index b7c568c..bc5b8fb 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs @@ -301,7 +301,7 @@ pub async fn spectrum( let context_updates = context.get_ref().clone(); let mut last_revision: Option = None; let updates = - IntervalStream::new(time::interval(Duration::from_millis(200))).filter_map(move |_| { + IntervalStream::new(time::interval(Duration::from_millis(40))).filter_map(move |_| { let context = context_updates.clone(); std::future::ready({ let next = context