log ping messages

This commit is contained in:
GroovieGermanikus 2024-01-03 16:46:57 +01:00
parent 4d7e781e9a
commit fe267b6f81
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,7 @@ use std::time::Duration;
use tokio::task::JoinHandle;
use tokio::time::{sleep, timeout};
use yellowstone_grpc_client::{GeyserGrpcClient, GeyserGrpcClientResult};
use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof;
use yellowstone_grpc_proto::geyser::{
CommitmentLevel, SubscribeRequest, SubscribeRequestFilterBlocks, SubscribeUpdate,
};
@ -224,7 +225,11 @@ pub fn create_geyser_reconnecting_stream(
match geyser_stream.next().await {
Some(Ok(update_message)) => {
trace!("> recv update message from {}", grpc_source);
if let Some(UpdateOneof::Ping(_)) = &update_message.update_oneof {
trace!("> recv ping message from {}", grpc_source);
} else {
trace!("> recv update message from {}", grpc_source);
}
(ConnectionState::Ready(attempt, geyser_stream), Message::GeyserSubscribeUpdate(Box::new(update_message)))
}
Some(Err(tonic_status)) => {