mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-23 05:48:05 +00:00
refactor: modernize dependency stack and minimize footprint
- Migrate to native 'std::sync' primitives (LazyLock, OnceLock, RwLock). - Replace 'parking_lot' with std library synchronization types. - Switch from 'chrono' to 'std::time::SystemTime' for lightweight timestamps. - Bump core dependencies: tokio (1.50.0) and rustls (0.23.37). - Decouple 'solana-program' by utilizing 'solana-sdk' re-exports. - Prune redundant crates: lazy_static, once_cell, chrono, maplit, and parking_lot. - Remove unused dev-dependencies (criterion) and example-only utils (env_logger). - Improve compile times and reduce supply chain attack surface.
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::streaming::event_parser::{Protocol, DexEvent};
|
||||
use crate::streaming::grpc::pool::factory;
|
||||
use crate::streaming::grpc::{EventPretty, SubscriptionManager};
|
||||
use anyhow::anyhow;
|
||||
use chrono::Local;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
use futures::channel::mpsc;
|
||||
use futures::{SinkExt, StreamExt};
|
||||
use log::error;
|
||||
@@ -247,10 +247,12 @@ impl YellowstoneGrpc {
|
||||
})
|
||||
.await;
|
||||
}
|
||||
log::debug!("service is ping: {}", Local::now());
|
||||
let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs();
|
||||
log::debug!("service is ping: {}", ts);
|
||||
}
|
||||
Some(UpdateOneof::Pong(_)) => {
|
||||
log::debug!("service is pong: {}", Local::now());
|
||||
let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs();
|
||||
log::debug!("service is pong: {}", ts);
|
||||
}
|
||||
_ => {
|
||||
log::debug!("Received other message type");
|
||||
|
||||
Reference in New Issue
Block a user