update NextBlock
This commit is contained in:
@@ -120,13 +120,13 @@ pub const SWQOS_ENDPOINTS_JITO: [&str; 8] = [
|
|||||||
|
|
||||||
pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [
|
pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [
|
||||||
"http://ny.nextblock.io",
|
"http://ny.nextblock.io",
|
||||||
"http://fra.nextblock.io",
|
"http://frankfurt.nextblock.io",
|
||||||
"http://fra.nextblock.io",
|
"http://amsterdam.nextblock.io",
|
||||||
"http://slc.nextblock.io",
|
"http://slc.nextblock.io",
|
||||||
"http://tokyo.nextblock.io",
|
"http://tokyo.nextblock.io",
|
||||||
"http://london.nextblock.io",
|
"http://london.nextblock.io",
|
||||||
"http://ny.nextblock.io",
|
"http://singapore.nextblock.io",
|
||||||
"http://fra.nextblock.io",
|
"http://frankfurt.nextblock.io",
|
||||||
];
|
];
|
||||||
|
|
||||||
pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [
|
pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ impl SwqosClientTrait for NextBlockClient {
|
|||||||
|
|
||||||
impl NextBlockClient {
|
impl NextBlockClient {
|
||||||
pub fn new(rpc_url: String, endpoint: String, auth_token: String) -> Self {
|
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 rpc_client = SolanaRpcClient::new(rpc_url);
|
||||||
let http_client = Client::builder()
|
let http_client = Client::builder()
|
||||||
.pool_idle_timeout(Duration::from_secs(60))
|
.pool_idle_timeout(Duration::from_secs(60))
|
||||||
|
|||||||
Reference in New Issue
Block a user