Skip to content

Commit 45f7200

Browse files
Ashutosh0xCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent e7e1ae3 commit 45f7200

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

crates/executor/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ pub struct ExecutorService {
2525
}
2626

2727
impl ExecutorService {
28-
pub fn new(selector: Arc<relay::NodeSelector>, signer: Option<LocalSigner>) -> Self {
29-
let rpc_url = "https://api.mainnet-beta.solana.com".to_string();
30-
Self {
28+
pub async fn new(selector: Arc<relay::NodeSelector>, signer: Option<LocalSigner>) -> Self {
29+
let best_node = selector.get_best().await;
30+
let rpc_url = best_node.rpc_url.clone();
31+
Self {
3132
selector,
3233
signer: signer.map(Arc::new),
3334
rpc_client: Arc::new(RpcClient::new(rpc_url)),

0 commit comments

Comments
 (0)