update swqos

This commit is contained in:
wood
2025-07-07 01:26:24 +08:00
parent 227ee20fb2
commit 0ca391ebe2
+1 -2
View File
@@ -78,6 +78,7 @@ pub struct SwqosConfig {
impl SwqosConfig {
pub fn new(endpoint: Option<String>, auth_token: Option<String>, swqos_type: SwqosType, region: SwqosRegion) -> Self {
let auth_token = auth_token.unwrap_or_else(|| "".to_string());
let endpoint = endpoint.unwrap_or_else(|| match swqos_type {
SwqosType::Jito => SWQOS_ENDPOINTS_JITO[region as usize].to_string(),
SwqosType::NextBlock => SWQOS_ENDPOINTS_NEXTBLOCK[region as usize].to_string(),
@@ -86,8 +87,6 @@ impl SwqosConfig {
SwqosType::Rpc => "".to_string(),
});
let auth_token = auth_token.unwrap();
Self { endpoint, auth_token, swqos_type }
}
}