try to enable compression

This commit is contained in:
GroovieGermanikus 2024-05-08 16:45:13 +02:00
parent 6ffc8d0f0d
commit 32aeb332b1
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
use std::time::Duration;
use tonic::codec::CompressionEncoding;
use tonic_health::pb::health_client::HealthClient;
use yellowstone_grpc_client::{GeyserGrpcClient, GeyserGrpcClientResult, InterceptorXToken};
use yellowstone_grpc_proto::geyser::geyser_client::GeyserClient;
@ -110,6 +111,7 @@ where
let client = GeyserGrpcClient::new(
HealthClient::with_interceptor(channel.clone(), interceptor.clone()),
GeyserClient::with_interceptor(channel, interceptor)
.accept_compressed(CompressionEncoding::Gzip)
.max_decoding_message_size(GeyserGrpcClient::max_decoding_message_size()),
);
Ok(client)