diff --git a/examples/stream_blocks_mainnet_task.rs b/examples/stream_blocks_mainnet_task.rs index 24c5eb4..431ae2e 100644 --- a/examples/stream_blocks_mainnet_task.rs +++ b/examples/stream_blocks_mainnet_task.rs @@ -1,4 +1,3 @@ -use futures::Stream; use log::{info, warn}; use solana_sdk::clock::Slot; use solana_sdk::commitment_config::CommitmentConfig; @@ -22,10 +21,10 @@ use tokio::sync::mpsc::Receiver; use yellowstone_grpc_proto::geyser::SubscribeUpdateBlock; use geyser_grpc_connector::grpc_subscription_autoreconnect_tasks::{ - create_geyser_autoconnection_task, create_geyser_autoconnection_task_with_mpsc, + create_geyser_autoconnection_task_with_mpsc, }; use geyser_grpc_connector::grpcmultiplex_fastestwins::{ - create_multiplexed_stream, FromYellowstoneExtractor, + FromYellowstoneExtractor, }; use geyser_grpc_connector::{GeyserFilter, GrpcConnectionTimeouts, GrpcSourceConfig, Message}; use tokio::time::{sleep, Duration}; diff --git a/src/grpc_subscription_autoreconnect_streams.rs b/src/grpc_subscription_autoreconnect_streams.rs index e53920c..de9e6b3 100644 --- a/src/grpc_subscription_autoreconnect_streams.rs +++ b/src/grpc_subscription_autoreconnect_streams.rs @@ -5,7 +5,7 @@ use log::{debug, info, log, trace, warn, Level}; use std::time::Duration; use tokio::task::JoinHandle; use tokio::time::{sleep, timeout}; -use yellowstone_grpc_client::{GeyserGrpcClient, GeyserGrpcClientResult}; +use yellowstone_grpc_client::{GeyserGrpcClientResult}; use yellowstone_grpc_proto::geyser::{SubscribeRequest, SubscribeUpdate}; use yellowstone_grpc_proto::tonic::Status; diff --git a/src/yellowstone_grpc_util.rs b/src/yellowstone_grpc_util.rs index bb5d4b9..b5e6e9a 100644 --- a/src/yellowstone_grpc_util.rs +++ b/src/yellowstone_grpc_util.rs @@ -11,23 +11,6 @@ use yellowstone_grpc_proto::tonic::service::Interceptor; use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig; -pub async fn connect_with_timeout( - endpoint: E, - x_token: Option, - tls_config: Option, - connect_timeout: Option, - request_timeout: Option, - connect_lazy: bool, -) -> GeyserGrpcClientResult> - where - E: Into, - T: TryInto, -{ - GeyserGrpcClient::connect_with_timeout( - endpoint, x_token, tls_config, connect_timeout, request_timeout, connect_lazy).await -} - - // see https://github.com/hyperium/tonic/blob/v0.10.2/tonic/src/transport/channel/mod.rs const DEFAULT_BUFFER_SIZE: usize = 1024; // see https://github.com/hyperium/hyper/blob/v0.14.28/src/proto/h2/client.rs#L45 @@ -104,7 +87,7 @@ pub async fn connect_with_timeout_with_buffers( let interceptor = InterceptorXToken { x_token }; let channel = endpoint.connect_lazy(); - let mut client = GeyserGrpcClient::new( + let client = GeyserGrpcClient::new( HealthClient::with_interceptor(channel.clone(), interceptor.clone()), GeyserClient::with_interceptor(channel, interceptor) .max_decoding_message_size(GeyserGrpcClient::max_decoding_message_size()),