From b729ec104e49126b25e20ed3228c309daffd12e4 Mon Sep 17 00:00:00 2001 From: wei <1415121722@qq.com> Date: Sat, 6 Sep 2025 23:16:55 +0800 Subject: [PATCH] update NextBlock --- src/constants/swqos.rs | 8 ++++---- src/swqos/nextblock.rs | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/constants/swqos.rs b/src/constants/swqos.rs index 0e628ff..487e11f 100755 --- a/src/constants/swqos.rs +++ b/src/constants/swqos.rs @@ -120,13 +120,13 @@ pub const SWQOS_ENDPOINTS_JITO: [&str; 8] = [ pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [ "http://ny.nextblock.io", - "http://fra.nextblock.io", - "http://fra.nextblock.io", + "http://frankfurt.nextblock.io", + "http://amsterdam.nextblock.io", "http://slc.nextblock.io", "http://tokyo.nextblock.io", "http://london.nextblock.io", - "http://ny.nextblock.io", - "http://fra.nextblock.io", + "http://singapore.nextblock.io", + "http://frankfurt.nextblock.io", ]; pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [ diff --git a/src/swqos/nextblock.rs b/src/swqos/nextblock.rs index 0d85381..64a5d54 100755 --- a/src/swqos/nextblock.rs +++ b/src/swqos/nextblock.rs @@ -44,6 +44,12 @@ impl SwqosClientTrait for NextBlockClient { impl NextBlockClient { pub fn new(rpc_url: String, endpoint: String, auth_token: String) -> Self { + // Ensure endpoint ends with /api/v2/submit + let endpoint = if endpoint.ends_with("/api/v2/submit") { + endpoint + } else { + format!("{}/api/v2/submit", endpoint.trim_end_matches('/')) + }; let rpc_client = SolanaRpcClient::new(rpc_url); let http_client = Client::builder() .pool_idle_timeout(Duration::from_secs(60))