Benign crates 6,747,301 installs Download

solana-connection-cache 1.15.2

“Solana Connection Cache”

Large registry install base (10k+ downloads)Package is at least one year old
SHA-2565c913dfcaf847cecd8866e4aeaa440b34c8a5dae6c1c90b7a8cb3265ff9fc775

Evidence

imports std::net::SocketAddr lines 1–21
1use {
2 crate::{
3 client_connection::ClientConnection as BlockingClientConnection,
4 connection_cache_stats::{ConnectionCacheStats, CONNECTION_STAT_SUBMISSION_INTERVAL},
5 nonblocking::client_connection::ClientConnection as NonblockingClientConnection,
6 },
7 indexmap::map::IndexMap,
8 rand::{thread_rng, Rng},
9 solana_measure::measure::Measure,
10 solana_sdk::timing::AtomicInterval,
11 std::{
12 net::SocketAddr,
13 sync::{atomic::Ordering, Arc, RwLock},
14 },
15 thiserror::Error,
16};
17
⋯4 lines
English function-word token "the" lines 71–76
71:19… tion_pool_size: 1.max(connection_pool_size), // The minimum pool size is 1.
72 connection_config,
73 }
74 }
75
76 /// Create a lazy c …
imports super::* lines 364–374
364:48… Stats>,
365 num_evictions: u64,
366 eviction_timing_ms: u64,
367}
368
369#[cfg(test)]
370mod tests {
371 use {
372 super::*,
373 crate::{
374 client_connection::ClientConnection as BlockingClientConnection,
imports std::net::IpAddr lines 375–390
375:65… NonblockingClientConnection,
376 },
377 async_trait::async_trait,
378 rand::{Rng, SeedableRng},
379 rand_chacha::ChaChaRng,
380 solana_sdk::transport::Result as TransportResult,
381 std::{
382 net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket},
383 sync::Arc,
384 },
⋯6 lines
Rust synchronous or async test attribute lines 542–552
542:50… 0");
543
544 addr_str.parse().expect("Invalid address")
545 }
546
547 #[test]
548 fn test_connection_cache() {
549 solana_logger::setup();
550 // Allow the test to run deterministically
551 // with the same pseudorandom sequence between runs
552 // and on different platforms - the cryptog …

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.