update NextBlock

This commit is contained in:
wei
2025-09-06 23:16:55 +08:00
parent 65ba15abfa
commit b729ec104e
2 changed files with 10 additions and 4 deletions
+4 -4
View File
@@ -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] = [
+6
View File
@@ -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))