Benign crates 7,214,890 installs download unavailable

solana-rpc-client 2.3.7

Legitimate Solana RPC client

“Solana RPC Client”

Contains an unbounded block loopRust test marker or harness
SHA-25640231712d6f1e5833ff1e101954786cbd0b5301098ea42384f7bb3e553085852

Evidence

imports reqwest::header::CONTENT_TYPE lines 1–32
1:5… Nonblocking [`RpcSender`] over HTTP.
2
3use {
4 crate::rpc_sender::*,
5 async_trait::async_trait,
6 log::*,
7 reqwest::{
8 self,
9 header::{self, CONTENT_TYPE, RETRY_AFTER},
10 StatusCode,
11 },
12 solana_rpc_client_api::{
13 client_error::Result,
14 custom_error,
15 error_object::RpcErrorObject,
16 request::{RpcError, RpcRequest, RpcResponseErrorData},
17 response::RpcSimulateTransactionResult,
18 },
19 std::{
20 sync::{
21 atomic::{AtomicU64, Ordering},
22 Arc, RwLock,
23 },
24 time::{Duration, Instant},
25 },
26 tokio::time::sleep,
27};
28
⋯4 lines
References a loopback HTTP URL lines 38–48
38:4… /// Create an HTTP RPC sender.
39 ///
40 /// The URL is an HTTP URL, usually for port 8899, as in
41 /// "http://localhost:8899". The sender has a default timeout of 30 seconds.
42 pub fn new<U: ToString>(url: U) -> Self {
43 Self::new_with_timeout(url, Duration::from_secs(30))
⋯5 lines
reqwest HTTP client builder lines 49–55
49:75… f {
50 Self::new_with_client(
51 url,
52 reqwest::Client::builder()
53 .default_headers(Self::default_headers())
54 .timeout(timeout)
55 .pool_idle_timeout( …
Contains an unbounded block loop lines 145–151
145:72… s).to_string();
146
147 let mut too_many_requests_retries = 5;
148 loop {
149 let response = {
150 let client = self.client.clone();
151 let request_json = request_json. …
imports super::* lines 232–243
232 fn url(&self) -> String {
233 self.url.clone()
234 }
235}
236
237#[cfg(test)]
238mod tests {
239 use super::*;
240
241 #[tokio::test(flavor = "multi_thread")]
242 async fn http_sender_on_tokio_multi_thread() {
243 let http_sender = HttpSender::new("http://localhost:1234".to_string( …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.