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))