From 2b69bfc2a5944b48f2347d38834906cb3c7544d2 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 12 Feb 2025 22:02:19 +0800 Subject: [PATCH] debug --- src/jito/api.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jito/api.rs b/src/jito/api.rs index 9ae8133..f9cf101 100644 --- a/src/jito/api.rs +++ b/src/jito/api.rs @@ -23,11 +23,9 @@ pub struct RpcResponse { } pub async fn get_tip_accounts(block_engine_url: &str) -> Result { - let mut client_builder = reqwest::Client::builder(); - if let Ok(http_proxy) = env::var("HTTP_PROXY") { - let proxy = Proxy::all(http_proxy)?; - client_builder = client_builder.proxy(proxy); - } + println!("get_tip_accounts: {}", block_engine_url); + + let client_builder = reqwest::Client::builder(); let client = client_builder.build()?; let request_body = RpcRequest { jsonrpc: "2.0".to_string(), @@ -35,6 +33,7 @@ pub async fn get_tip_accounts(block_engine_url: &str) -> Result { method: "getTipAccounts".to_string(), params: vec![], }; + let result = client .post(format!("{}/api/v1/bundles", block_engine_url)) .json(&request_body) @@ -43,6 +42,7 @@ pub async fn get_tip_accounts(block_engine_url: &str) -> Result { .json::() .await?; + println!("result: {:?}", result); Ok(result) } /// tip accounts